Using the .NET Math class

suggest change

Use 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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents