Hi guys (and girls),
I have one question about Mathf.Sin. When i put:
print(Mathf.Sin(Mathf.PI));
It return “-8.742278E-08”. Why? i supposed to return 0.
What im doing wrong?
Hi guys (and girls),
I have one question about Mathf.Sin. When i put:
print(Mathf.Sin(Mathf.PI));
It return “-8.742278E-08”. Why? i supposed to return 0.
What im doing wrong?
That is 0, or close enough that it doesn’t make any difference. Floating point imprecision is the cause.
–Eric
Thanks Eric!
Its solve my problem! ![]()