Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

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

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