Namespace: DeltaEngine.Extensions
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.Extensions.MathExtensionsTests
1 unit tests call DeltaEngine.Extensions.MathExtensions.Abs(System.Single)
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- value
- Type: System Single
Return Value
Type: SingleUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Single. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
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