mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
Ref T429, functions for angle, heading and situation
* normalize angle -180/+180 when set on situation * clamp vector function
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user