MathExtensionsTests Sqrt Method Delta Engine Documentation

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

public void Sqrt()
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