From Clomosy Docs

No edit summary
No edit summary
Line 6: Line 6:


'''Example:'''<br>
'''Example:'''<br>
:'''Base Syntax'''
 
:'''TRObject Syntax'''
   var
   var
     floatValue : single;
     floatValue : single;
Line 13: Line 14:
     PI = 3.14;
     PI = 3.14;
    
    
   begin
   {
     // The ArcTan of PI/2 should give 1.0
     // The ArcTan of PI/2 should give 1.0
     floatValue := ArcTan(PI/2);
     floatValue = ArcTan(PI/2);
     ShowMessage('ArcTan of PI/2 = '+FloatToStr(floatValue));
     ShowMessage('ArcTan of PI/2 = '+FloatToStr(floatValue));
   end;
   }


:'''TRObject Syntax'''
:'''Base Syntax'''
   var
   var
     floatValue : single;
     floatValue : single;
Line 26: Line 27:
     PI = 3.14;
     PI = 3.14;
    
    
   {
   begin
     // The ArcTan of PI/2 should give 1.0
     // The ArcTan of PI/2 should give 1.0
     floatValue = ArcTan(PI/2);
     floatValue := ArcTan(PI/2);
     ShowMessage('ArcTan of PI/2 = '+FloatToStr(floatValue));
     ShowMessage('ArcTan of PI/2 = '+FloatToStr(floatValue));
   }
   end;


'''Output:'''<br>
'''Output:'''<br>
  ArcTan of PI/2 = 1,00365507798033
  ArcTan of PI/2 = 1,00365507798033

Revision as of 10:41, 23 August 2024

function ArcTan(const Number Extended):Extended;

The ArcTan function is a mathematical function giving the value in radians of the Arc Tangent of Number.

PI radians = 180 degrees

Example:

TRObject Syntax
 var
   floatValue : single;
 
 const
   PI = 3.14;
 
 {
   // The ArcTan of PI/2 should give 1.0
   floatValue = ArcTan(PI/2);
   ShowMessage('ArcTan of PI/2 = '+FloatToStr(floatValue));
 }
Base Syntax
 var
   floatValue : single;
 
 const
   PI = 3.14;
 
 begin
   // The ArcTan of PI/2 should give 1.0
   floatValue := ArcTan(PI/2);
   ShowMessage('ArcTan of PI/2 = '+FloatToStr(floatValue));
 end;

Output:

ArcTan of PI/2 = 1,00365507798033