std-ccw


Synopsis

(std-ccw <p0> <p1> <p2>) ; counterclockwise test

Description

STD-CCW returns either 0, 1 or -1.

1 if the triangle p0 p1 p2 is ordered counterclockwise (mathematically positive),

-1 if it's clockwise or if p0 is between p1 and p2 (on the segment)

0 if p2 is on the segment between p0 and p1

Arguments

p0, p1, p2: 2d or 3d points

Return Value

0, 1 or -1

Side Effects

None.

Module

(std-require 'STDPOINT)

Defined in STDPOINT since v0.4008.