User Tools

Site Tools


en:sin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:sin [2016/08/12 12:18]
admin
en:sin [2020/02/28 10:46]
Line 1: Line 1:
-===== Sin (Function) ===== 
- 
-==== Format ==== 
- 
-**sin** ( [[numericexpressions|numeric_expression]] ) 
- 
-returns [[floatexpressions|float_expression]] 
- 
-==== Description ==== 
- 
-Computes the sine of [[expressions|expression]]. //Expression// must be in radians. 
- 
-==== Note ==== 
- 
-The sin function does not produce an exact result. 
- 
-==== Example ==== 
- 
-<code> 
-clg 
-color black 
-# draw a line across the graphic output 
-line 0,150,300,150 
-# where do we start 
-lastx = 0 
-lasty = sin(0) * 50 + 150 
-# now step across the line and draw 
-for x = 0 to 300 step 5 
-   angle = x / 300 * 2 * pi 
-   y = sin(angle) * 50 + 150 
-   line lastx, lasty, x, y 
-   lastx = x 
-   lasty = y 
-next x 
-</code> 
-Draws 
-{{sin.jpg|Sine Curve}} 
- 
-==== See Also ==== 
-{{page>en:start#Mathematics&noheader}} 
  
en/sin.txt ยท Last modified: 2020/02/28 10:46 (external edit)