Description |
Returns the ArcTangent (ATan) value in radians of Y/X.
|
| Notes | Static methods are not methods of an object - they are simply class functions or procedures available at any time.
|
|
Microsoft MSDN Links |
System
System.Math
|
|
|
A simple example |
program Project1;
{$APPTYPE CONSOLE}
var
float : Double;
begin
// Given the following triangle :
// .
// /|
// / |
// / | Y = 2.0
// / |
// /A |
// .-----.
// X = 1.0
// Angle A = ArcTan(Y/X) = ArcTan(2/1) = ArcTan(0.5) = 63.43495 degrees
float := System.Math.ATan2(2.0, 1.0);
// Convert to degrees to show the value
float := float * 180 / PI;
Console.WriteLine('ATan2(2.0, 1.0) = {0} degrees', float.ToString);
Console.ReadLine;
end.
| Show full unit code | ATan2(2.0, 1.0) = 63.434948822922 degrees
|
|
|
|