readable function
Vector2
readable(
- Vector2 u
u (a world unit direction) or its reverse, so text along it reads
from the bottom or the right of the page (spec 11 D8, R-11): reversed
when u.x < −dimFormat.angular, or when |u.x| ≤ dimFormat.angular and
u.y < 0. Text angles land in (−90°, 90°], and exactly vertical, within
the tolerance, reads upwards (+90°): a group turned −90° gives u = (6.1e-17, −1), which without it would read from the left.
Implementation
Vector2 readable(Vector2 u) {
if (u.x < -dimFormat.angular || (u.x.abs() <= dimFormat.angular && u.y < 0)) {
return -u;
}
return u;
}