Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Converting VBScript's Atn Function

Windows PowerShell

Definition: Returns the arctangent of a number.


Granted, this one doesn't come up too terribly often in system administration scripts. Nevertheless, if you ever do need to calculate the arctangent of an angle you can do so using the System.Math class and the Atan method. This command assigns the arctangent of a 90 degree angle to the variable $a:

$a = [math]::atan(90)

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.