API Docs for: 0.1.0
Show:

Point Class

Defined in: src/Point.js:3

Point related functions

Item Index

Methods

Methods

area

(
  • a
  • b
  • c
)
Number static

Defined in src/Point.js:9

Get the area of a triangle spanned by the three given points. Note that the area will be negative if the points are not given in counter-clockwise order.

Parameters:

  • a Array
  • b Array
  • c Array

Returns:

Number:

collinear

(
  • a
  • b
  • c
  • [thresholdAngle=0]
)
Boolean

Defined in src/Point.js:41

Check if three points are collinear

Parameters:

  • a Array
  • b Array
  • c Array
  • [thresholdAngle=0] Number optional

    Threshold angle to use when comparing the vectors. The function will return true if the angle between the resulting vectors is less than this value. Use zero for max precision.

Returns:

Boolean: