Search Unity

My world falls apart when math isn't logical..

Discussion in 'Scripting' started by TheNoobieWaffle, Nov 8, 2014.

  1. TheNoobieWaffle

    TheNoobieWaffle

    Joined:
    Jul 12, 2014
    Posts:
    28
    My calculator: cos(0)=1 cos(90)=1
    Unity Engine: cos(0)=1 cos(90)=-0.4480736

    My world is broken -- TheNoobieWaffle 11:56PM EST 11/7/2014
     
  2. TheNoobieWaffle

    TheNoobieWaffle

    Joined:
    Jul 12, 2014
    Posts:
    28
    Can someone explain to me why this is? All I want is a cosine is 90 to equal 0.. Thats all Ive ever really wanted.
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Maybe you should convert to degrees, then, rather than using radians. By the way, cos(90) will never equal 1. I assume you used sin(90). Lesson: math is always logical.

    --Eric
     
  4. christinanorwood

    christinanorwood

    Joined:
    Aug 9, 2013
    Posts:
    402
  5. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
  6. TheNoobieWaffle

    TheNoobieWaffle

    Joined:
    Jul 12, 2014
    Posts:
    28
    Damn in my post I said cos(90)=1, by bad, it equals 0.
     
  7. TheNoobieWaffle

    TheNoobieWaffle

    Joined:
    Jul 12, 2014
    Posts:
    28
    Thanks for the support with Deg2Rad, Ill go try that out.