Table of Contents

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

other GeoVector3

The vector to measure to.

referenceNormal GeoVector3

The axis the rotation is measured around, which fixes what counts as the positive direction.

Returns

double

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.