Author  Posts 
Having trouble working with the following math problem. With the following info; 64.30 mils is the angle, 60 meters is the base, solve for distance ((64.30/2)*.05625)[decimal][math]::?)*60/2 Thx 

Sorry, I don't understand the math side of it but if you want a cotangent function you derive it from the tangent function: 1/[math]::tan(x) I'm assuming your trig is correct ðŸ™‚ so I guess it would be something like: Distance = 1/[math]::tan((64.3/2))*(60/2) Wolfram Alpha and PowerShell give the same answer for that so hopefully that's correct – it's nowhere near 950 meters though... 

Thanks for your help. Your suggestion works with the additional information that [math]::tan($angle) is expecting the angle to be in radians but I was giving it the angle in degrees. Adding $vAngleInDegrees / 180 * [math]::PI fixed that. $vSubtendedDistance=((1/([decimal][math]::Tan(($vAngleInDegrees / 180 * [math]::PI))))*$vBase/2) 
You must be logged in to reply to this topic.