**Summary**: Find the tangent of a 45-degree angle with Windows PowerShell.

How can I use Windows PowerShell to obtain the tangent of a 45-degree angle?

Use the **Tan** static method from the **[math]** class, for example:

[math]::tan(45)

**Summary**: Find the tangent of a 45-degree angle with Windows PowerShell.

How can I use Windows PowerShell to obtain the tangent of a 45-degree angle?

Use the **Tan** static method from the **[math]** class, for example:

[math]::tan(45)

But..but..but… They are all zero!

PS C:scripts> [math]::tanh(0)

0

PS C:scripts> [math]::tanh(30)

1

PS C:scripts> [math]::tanh(60)

1

PS C:scripts> [math]::tanh(90)

1

PS C:scripts> [math]::tanh(120)

1

PS C:scripts>

[Math]::Tan works with radians not degrees.

[Math]::Tan(45*[Math]::PI/180)

2 Jv

Tan and Tanh is different things.

Pretty gud..

@PetSerAl you are right. Should have looked this up first, it is documented on MSDN:

https://msdn.microsoft.com/en-us/library/system.math.tan(v=vs.110).aspx