MathExtensions WrapRotationToMinus180ToPlus180 Method Delta Engine Documentation

Namespace: DeltaEngine.Extensions
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public static float WrapRotationToMinus180ToPlus180(
	float degrees
)

Return Value

Type: Single
Remarks

Tests: DeltaEngine.Tests.Extensions.MathExtensionsTests
Examples

1 unit tests call DeltaEngine.Extensions.MathExtensions.WrapRotationToMinus180ToPlus180(System.Single)
[Test]
public void WrapRotationToMinus180ToPlus180()
{
    Assert.AreEqual(0, MathExtensions.WrapRotationToMinus180ToPlus180(0));
    Assert.AreEqual(90, MathExtensions.WrapRotationToMinus180ToPlus180(90));
    Assert.AreEqual(180, MathExtensions.WrapRotationToMinus180ToPlus180(180));
    Assert.AreEqual(-90, MathExtensions.WrapRotationToMinus180ToPlus180(270));
    Assert.AreEqual(0, MathExtensions.WrapRotationToMinus180ToPlus180(720));
}
See Also