1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// src/ops/coverage/angular.rs
//! The counterclockwise order of directions at a vertex, decided exactly and
//! constructing nothing. The argument is in the parent module's
//! documentation.
use Ordering;
use Sign;
use crateorient;
use crateCoord2d;
/// Which half-turn the direction from `v` to `a` lies in: `0` for the upper
/// half `[0, π)`, `1` for the lower half `[π, 2π)`.
///
/// Only signs of computed differences are read, and a correctly rounded
/// difference has the sign of the exact one (zero exactly when the
/// coordinates are equal). Comparisons with `0.0` treat `-0.0` as zero, as
/// a coordinate difference of zero must be.
/// The counterclockwise order, starting from the `+x` direction, of the
/// directions from `v` to `a` and from `v` to `b` (`a, b ≠ v`).
///
/// Different half-turns order by half. Within one half the directions span
/// less than a half turn, so `orient2d(v, a, b) > 0` means `b` is
/// counterclockwise of `a`. `Equal` means the same direction (collinear and
/// on the same side of `v`).
pub