quickUnitNormal Method

Compute and normalize cross product among 3 points on the linestring.

  • Essentially 3 random points are used to form the cross product.
  • This is appropriate for a polygon known to be convex.
  • No test for convexity or collinearity is performed.
  • If the polygon is not convex, the returned normal may be reversed.
  • If the random points used in the cross product are collinear, undefined is returned.

quickUnitNormal(result?: Vector3d): undefined | Vector3d

@returns unit normal, or undefined if normalization failed

Parameter Type Description
result Vector3d pre-allocated object to populate and return

Returns - undefined | Vector3d

unit normal, or undefined if normalization failed

Defined in

Last Updated: 14 November, 2024