MathExtensions Sqrt Method Delta Engine Documentation

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

public static float Sqrt(
	float value
)

Return Value

Type: Single
Remarks

Tests: DeltaEngine.Tests.Extensions.MathExtensionsTests
Examples

2 unit tests call DeltaEngine.Extensions.MathExtensions.Sqrt(System.Single)
[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