Hello everyone! I’m sorry to bother you all with this simple question but I can’t get my head around it.
I have this code (see below) which is working fine but math.cos(math.pi/2)
is giving a really wierd number. Is this intentional or a bug? According to google and desmos math.cos(math.pi/2)
should be 0.
for i = 0,math.pi/2,math.pi/100 do
print(math.cos(i))
end
print(math.cos(math.pi/2))
These are the (last couple of) results:
math.cos(math.pi/2))
suddenly becomes 6.123...
instaid of 0.
Is there a way around this without adding if statements or is this a bug?