From Clomosy Docs

(Created page with " function Sin(const Number Extended):Extended; The Sin function is a mathematical function giving the Sine value of a Number value given radians.<br> '''Example:'''<br> '''const''' PI = 3.14;<br> '''var''' floatValue : float;<br> '''begin'''<br> floatValue := Sin(PI/6); ShowMessage('Sin(PI/6) = '+FloatToStr(floatValue));<br> '''end;''' '''Output:'''<br> Sin(PI/6) = 0,499770102643102")
 
No edit summary
Line 4: Line 4:


'''Example:'''<br>
'''Example:'''<br>
'''const'''
:'''Base Syntax'''
  PI = 3.14;<br>
  const
'''var'''
    PI = 3.14;
  floatValue : float;<br>
 
'''begin'''<br>
  var
  floatValue := Sin(PI/6);
    floatValue : float;
  ShowMessage('Sin(PI/6) = '+FloatToStr(floatValue));<br>
 
'''end;'''
  begin
 
    floatValue := '''Sin'''(PI/6);
    ShowMessage('Sin(PI/6) = '+FloatToStr(floatValue));
 
  end;
 
:'''TRObject Syntax'''
 
  const
    PI = 3.14;
 
  var
    floatValue : float;
 
  {
 
    floatValue = '''Sin'''(PI/6);
    ShowMessage('Sin(PI/6) = '+FloatToStr(floatValue));
 
  }


'''Output:'''<br>
'''Output:'''<br>
  Sin(PI/6) =  0,499770102643102
  Sin(PI/6) =  0,499770102643102

Revision as of 13:41, 13 February 2024

function Sin(const Number Extended):Extended;

The Sin function is a mathematical function giving the Sine value of a Number value given radians.


Example:

Base Syntax
 const
   PI = 3.14;
 
 var
   floatValue : float;
 
 begin
 
   floatValue := Sin(PI/6);
   ShowMessage('Sin(PI/6) = '+FloatToStr(floatValue));
 
 end;
TRObject Syntax
 const
   PI = 3.14;
 
 var
   floatValue : float;
 
 {
 
   floatValue = Sin(PI/6);
   ShowMessage('Sin(PI/6) = '+FloatToStr(floatValue));
 
 }

Output:

Sin(PI/6) =  0,499770102643102