Converting VBScript's Sin Function

Definition: Returns the sine of an angle.


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:


Return to the VBScript to Windows PowerShell home page