Home > Enterprise >  I can't find dots on an unit cirlce from degrees
I can't find dots on an unit cirlce from degrees

Time:03-18

I want to have coordinates of places all around of the circle

Debug.Log("Degree: "   Degree);

x = Mathf.Cos(Degree);
y = Mathf.Sin(Degree);

Debug.Log("x: "   x   "   y: "   y);

my outputs are:

Degree: 60
x: -0.952413 y: -0.3048106

Degree: 120
x: 0.814181 y: 0.5806112

Degree: 180
x: -0.5984601 y: -0.8011526

Degree: 240
x: 0.3257813 y: 0.9454452

Degree: 300
x: -0.02209662 y: -0.9997559

Degree: 360
x: -0.2836911 y: 0.9589157

why doesn't this work? simple geomatry I know says this should give me positions of every 60 degree

CodePudding user response:

As the Pac0 said in the comments

from the Mathf.Cos Unity3d documentation "f The input angle, in radians."

  • Related