MathExtensionsTests Abs 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 Abs()
Examples

[Test]
public void Abs()
{
    Assert.AreEqual(5, MathExtensions.Abs(2) + MathExtensions.Abs(3));
    Assert.AreEqual(5, MathExtensions.Abs(-2) + MathExtensions.Abs(3));
    Assert.AreEqual(5, 2.0f.Abs() + 3.0f.Abs());
    Assert.AreEqual(5, (-2.0f).Abs() + 3.0f.Abs());
}
See Also