Method GetSignedAngleTo
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
GetSignedAngleTo(GeoVector3, GeoVector3)
Gets the signed angle to another vector in radians, in the range (-PI, PI], measured counter-clockwise around a reference axis.
public double GetSignedAngleTo(GeoVector3 other, GeoVector3 referenceNormal)
Parameters
otherGeoVector3The vector to measure to.
referenceNormalGeoVector3The axis the rotation is measured around, which fixes what counts as the positive direction.
Returns
Remarks
An angle between two vectors in 3D has no sign of its own: the rotation that takes one to the other looks counter-clockwise from one side and clockwise from the other. The reference axis is what picks the side, which is why this overload needs one and the 2D case does not.
Exceptions
- InvalidOperationException
Thrown when any of the three vectors has zero length.