Using the .Net Math Class

suggest change

You can use the .Net Math class to do calculations ([System.Math])

If you want to know which methods are available you can use:

[System.Math] | Get-Member -Static -MemberType Methods

Here are some examples how to use the Math class:

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