[This is preliminary documentation and is subject to change.]

The absolute value of the returned value is two times the area of the triangle ABC.

Namespace: org.critterai.geom
Assembly: cai-util (in cai-util.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static float GetSignedAreaX2(
	Vector2 a,
	Vector2 b,
	Vector2 c
)
Public Shared Function GetSignedAreaX2 ( _
	a As Vector2, _
	b As Vector2, _
	c As Vector2 _
) As Single
public:
static float GetSignedAreaX2(
	Vector2 a, 
	Vector2 b, 
	Vector2 c
)

Parameters

a
Vector2
Vertex A of triangle ABC.
b
Vector2
Vertex B of triangle ABC
c
Vector2
Vertex C of triangle ABC

Return Value

The absolute value of the returned value is two times the area of the triangle ABC.

Remarks

A positive return value indicates:

  • Counterclockwise wrapping of the vertices.
  • Vertex B lies to the right of line AC, looking from A toward C.

A negative value indicates:

  • Clockwise wrapping of the vertices.
  • Vertex B lies to the left of line AC, looking from A toward C.

A value of zero indicates that all points are collinear or represent the same point.

This is a low cost method.

See Also