Sin is a trigonometric function that calculates angles.

Sin uses radians, and returns the Sin (or sine) of the value given as e.

e is a radian value, where one (1) radian is calculated as 180 over Pi, and is equivalent to an angle of 57.29577951 degrees.

Declaration: Function Sin(e : Extended) : Extended

Several examples follow.

procedure ScriptEvent (var Value : variant);
var
aEx : extended;
begin
LogInfo('');
 
//Returns 'Sin 123 = -0.459903490689591'
aEx:= Sin(123);
LogInfo('Sin 123 = '+FloatToStr(aEx));
 
//Returns 'Sin 180 = -0.80115263573383'
aEx := Sin(180);
LogInfo('Sin 180 = '+FloatToStr(aEx));
//Returns 'Sin 1 = 0.841470984807896'
aEx := Sin(1);
LogInfo('Sin 1 = '+FloatToStr(aEx));
//Returns 'Sin 2 = 0.909297426'825682
aEx := Sin(2);
LogInfo('Sin 2 = '+FloatToStr(aEx));
//Returns 'Sin -1 = -0.841470984807896'
aEx := Sin(-1);
LogInfo('Sin -1 = '+FloatToStr(aEx));
 
LogInfo('');
end;