This shows you the differences between two versions of the page.
nl:cos [2016/01/01 22:46] |
nl:cos [2020/02/28 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Cos ===== | ||
+ | ==== Formaat ==== | ||
+ | **cos** ( // | ||
+ | ==== Beschrijving ==== | ||
+ | Dit is een wiskundige formule, meer bepaald uit de [[http:// | ||
+ | |||
+ | De functie berekent de cosinus van // | ||
+ | |||
+ | Meer informatie over deze functie vind je op de wiki : [[http:// | ||
+ | ==== Voorbeeld ==== | ||
+ | <code basic4gl> | ||
+ | clg | ||
+ | color black | ||
+ | # tekent de assen | ||
+ | line 0, | ||
+ | line 150, | ||
+ | # we starten hier | ||
+ | color blue | ||
+ | lastx = 0 | ||
+ | lasty = cos(0) * 50 + 150 | ||
+ | # now step across the line and draw | ||
+ | for x = 0 to 300 step 5 | ||
+ | angle = x / 300 * 2 * pi | ||
+ | y = cos(angle) * 50 + 150 | ||
+ | line lastx, lasty,x, y | ||
+ | lastx = x | ||
+ | lasty = y | ||
+ | next x | ||
+ | </ | ||
+ | |||
+ | ++++geeft dan :| | ||
+ | {{: | ||
+ | ++++ | ||
+ | |||
+ | ==== Zie ook ==== | ||
+ | [[acos|Acos]], | ||
+ | |||
+ | ---- | ||
+ | [[ceil|vorige]] | [[mathematical|Wiskundige Functies]] | [[degrees|volgende]] | ||