Namespace: DeltaEngine.Extensions
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.Extensions.MathExtensionsTests
2 unit tests call DeltaEngine.Extensions.MathExtensions.Sqrt(System.Single)
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- value
- Type: System Single
Return Value
Type: SingleRemarks
Examples
[Test] public void Sqrt() { Assert.AreEqual(0.0f, MathExtensions.Sqrt(0.0f)); Assert.AreEqual(2.0f, MathExtensions.Sqrt(4.0f)); Assert.AreEqual(9.0f, MathExtensions.Sqrt(81.0f)); }
[Test] public void InvSqrt() { Assert.AreEqual(0.5f, 4.0f.InvSqrt()); Assert.AreEqual(0.1f, 100.0f.InvSqrt()); Assert.AreEqual(10.0f, 0.01f.InvSqrt()); }
See Also