Ref T429, functions for angle, heading and situation

* normalize angle -180/+180 when set on situation
* clamp vector function
This commit is contained in:
Klaus Basan
2018-11-09 02:26:07 +01:00
parent 985c06816b
commit 7807a05f2a
8 changed files with 89 additions and 33 deletions

View File

@@ -97,6 +97,12 @@ namespace BlackMisc
//! Tangent of angle
double tan() const;
//! Normalize to +- 180deg, [-179.99, 180.0]
void normalizeToPlusMinus180Degrees();
//! As [-179.99, 180.0] normalized heading
CAngle normalizedToPlusMinus180Degrees() const;
//! Normalize: -180< degrees ≤180
static double normalizeDegrees180(double degrees, int roundDigits = -1);