Using the .NET Math class
suggest changeUse the .NET [System.Math] class for calculations. Call static members with ::.
To list the methods:
[System.Math] | Get-Member -Static -MemberType Method
Get-Member -MemberType takes Method, not Methods. Examples:
PS C:\> [System.Math]::Floor(9.42)
9
PS C:\> [System.Math]::Ceiling(9.42)
10
PS C:\> [System.Math]::Pow(4,3)
64
PS C:\> [System.Math]::Sqrt(49)
7
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents