changeset 4554:23236657b032 iso-areas

Use Sub2D in triangles 2D contains.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 01 Oct 2019 14:51:20 +0200
parents 4c476d65d1bb
children 1c5c6ffab886
files pkg/octree/vertex.go
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/octree/vertex.go	Tue Oct 01 13:40:01 2019 +0200
+++ b/pkg/octree/vertex.go	Tue Oct 01 14:51:20 2019 +0200
@@ -350,9 +350,9 @@
 }
 
 func (t *Triangle) Contains(x, y float64) bool {
-	v0 := t[2].Sub(t[0])
-	v1 := t[1].Sub(t[0])
-	v2 := Vertex{X: x, Y: y}.Sub(t[0])
+	v0 := t[2].Sub2D(t[0])
+	v1 := t[1].Sub2D(t[0])
+	v2 := Vertex{X: x, Y: y}.Sub2D(t[0])
 
 	dot00 := v0.Dot2(v0)
 	dot01 := v0.Dot2(v1)