Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Atan2: float a1 = Mathf.Atan2 (1, 1); returns 0

Discussion in 'Scripting' started by ivanbolcina, Nov 29, 2017.

  1. ivanbolcina

    ivanbolcina

    Joined:
    Oct 27, 2013
    Posts:
    41
    Hi.

    float a1 = Mathf.Atan2 (1, 1);

    This return 0. How is this possible?

    This test was done on linux editor, latest build.


    On VS on Windows, Math.Atan2(1,1) in C# returns 0.78....

    BR
     
  2. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,083
    Probably best to report that in the Linux section of the forum or as a bug report. Incidentally, have you tried it with 1.0f,1.0f rather than 1,1?
     
  3. ivanbolcina

    ivanbolcina

    Joined:
    Oct 27, 2013
    Posts:
    41
    I have tried, but it is the same...