This shows you the differences between two versions of the page.
fr:tan [2016/01/01 22:45] |
fr:tan [2020/02/28 10:46] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Tan ===== | ||
+ | ==== Format ==== | ||
+ | **tan** ( // | ||
+ | ==== Description ==== | ||
+ | Calcul et retourne la tangente de // | ||
+ | ==== Remarque ==== | ||
+ | La fonction tangente ne produit pas un résultat exacte. | ||
+ | ==== Voir Aussi ==== | ||
+ | [[acos|Acos]], | ||
+ | ==== Example ==== | ||
+ | < | ||
+ | clg | ||
+ | color black | ||
+ | # On trace l'axe des x | ||
+ | line 0, | ||
+ | # on calcul le premier point | ||
+ | lastx = 0 | ||
+ | lasty = tan(0) * 50 + 150 | ||
+ | # on trace une ligne entre chaque point de la courbe | ||
+ | for x = 0 to 300 step 5 | ||
+ | angle = x / 300 * 2 * pi | ||
+ | y = tan(angle) * 50 + 150 | ||
+ | line lastx, lasty, x, y | ||
+ | lastx = x | ||
+ | lasty = y | ||
+ | next x | ||
+ | </ | ||
+ | Donnera le résultat suivant:\\ | ||
+ | {{tan.jpg}} | ||