Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "signed-area"

Index

Functions

Const signedArea2

  • signedArea2(a: ArrayLikeIterable<number>, b: ArrayLikeIterable<number>, c: ArrayLikeIterable<number>): number
  • Returns area * 2 of the 2D triangle defined by the input vectors. This is a useful classifier for many geometry processing tasks. In addition to the triangle area, the result can also be interpreted as follows:

    • > 0: points are ordered counterclockwise
    • < 0: points are ordered clockwise
    • 0: points are co-linear

    Same as: cross2(sub2([], b, a), sub2([], c, a))

    Parameters

    • a: ArrayLikeIterable<number>

      -

    • b: ArrayLikeIterable<number>

      -

    • c: ArrayLikeIterable<number>

      -

    Returns number

Const signedAreaC2

  • signedAreaC2(ax: number, ay: number, bx: number, by: number, cx: number, cy: number): number

Generated using TypeDoc