cosine and sine values
Posted: Fri Sep 01, 2017 10:26 pm
ok I'm missing something obvious, obviously. But I'm sure someone can quickly tell me what the issue is.
this code:
outputs this:
angle: 0 cos: 1 sin: 0
angle: 90 cos: -0.44807361612917 sin: 0.89399666360056
angle: 180 cos: -0.59846006905786 sin: -0.80115263573383
shouldn't it be:
angle: 0 cos: 1 sin: 0
angle: 90 cos: 0 sin: 1
angle: 180 cos: 1 sin: 0
?
this code:
Code: Select all
angle = 0
print("angle: "..angle.." cos: "..math.cos(angle).." sin: "..math.sin(angle))
angle = 90
print("angle: "..angle.." cos: "..math.cos(angle).." sin: "..math.sin(angle))
angle = 180
print("angle: "..angle.." cos: "..math.cos(angle).." sin: "..math.sin(angle))
angle: 0 cos: 1 sin: 0
angle: 90 cos: -0.44807361612917 sin: 0.89399666360056
angle: 180 cos: -0.59846006905786 sin: -0.80115263573383
shouldn't it be:
angle: 0 cos: 1 sin: 0
angle: 90 cos: 0 sin: 1
angle: 180 cos: 1 sin: 0
?