fix: bug in isInsideTriangle

This commit is contained in:
Stig Rune Jensen
2024-02-23 14:05:42 +01:00
parent ff283cd910
commit 8d7ab4164c

View File

@@ -429,7 +429,7 @@ module Util =
let neg = (d1 <= 0.) || (d2 <= 0.) || (d3 <= 0.)
let pos = (d1 >= 0.) || (d2 >= 0.) || (d3 >= 0.)
neg && pos |> not
(neg && pos) |> not
let inline isInsideTriangle_dbl (x, y, z) p =
let sign (p1x, p1y) (p2x, p2y) (p3x, p3y) =
@@ -443,7 +443,7 @@ module Util =
let neg = (d1 <= 0.0) || (d2 <= 0.0) || (d3 <= 0.0)
let pos = (d1 >= 0.0) || (d2 >= 0.0) || (d3 >= 0.0)
neg && pos |> not
(neg && pos) |> not
// make a kd-tree for looking up nearest node
let buildNearestNodeTree (grid: IGrid) =
@@ -670,4 +670,4 @@ type ExtendedGrid(grid: IGrid) =
elementTree <- binarySerializer.UnPickle<IdxTree> pickle |> Some
true
else
false
false