Skip to content

Commit

Permalink
fix error in cone shape
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenMulkers committed Jan 18, 2018
1 parent bbcaa6a commit 4fb9562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engine/shape.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func Ellipse(diamx, diamy float64) Shape {
// 3D Cone with the vertex down.
func Cone(diam, height float64) Shape {
return func(x, y, z float64) bool {
return z >= 0 && sqr64(x/diam)+sqr64(y/diam)-sqr64(z/height) <= 0.25
return z >= 0 && sqr64(x/diam)+sqr64(y/diam)+0.25*sqr64(z/height) <= 0.25
}
}

Expand Down

0 comments on commit 4fb9562

Please sign in to comment.