Export (0) Print
Expand All
Expand Minimize

Converting VBScript's Sin Function


Windows PowerShell


Definition: Returns the sine of an angle.

Sin

In mathematics the sine of an angle is defined as … well, it doesn’t matter what the definition is. Instead, all that matters is that, in Windows PowerShell, you can use the System.Math class and the Sin method. For example, this command calculates the sine of a 45-degree angle and then stores the result in the variable $a:


$a = [math]::sin(45)

When you run this command and then echo back the value of $a you should get the following:


0.850903524534118


Return to the VBScript to Windows PowerShell home page

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft