Comments and answers for "Mathf.Sin only returning positive values?"
http://answers.unity.com/questions/1688397/mathfsin-only-returning-positive-values.html
The latest comments and answers for the question "Mathf.Sin only returning positive values?"Answer by DehLeprechaun
http://answers.unity.com/answers/1688458/view.html
I have apparently solved the problem by using the following equation:
NewTrueAnomaly = 2 * Mathf.Atan(Mathf.Sqrt((1 - planet.Eccentricity * Mathf.Deg2Rad) / (1 - planet.Eccentricity *
Mathf.Deg2Rad)) * Mathf.Tan(eccentric_anomaly * Mathf.Deg2Rad / 2)) * Mathf.Rad2Deg;
And by using a more appropriate time system that keeps things more consistent. Things seem to be working alright now.Fri, 03 Jan 2020 05:01:28 GMTDehLeprechaunComment by DehLeprechaun on DehLeprechaun's answer
http://answers.unity.com/comments/1688453/view.html
You were correct, after I checked my true anomaly output, it was swinging between 0 - 180.Fri, 03 Jan 2020 03:07:19 GMTDehLeprechaunComment by DehLeprechaun on DehLeprechaun's answer
http://answers.unity.com/comments/1688433/view.html
Actually, now that you mention it. I think my true anomaly calculation is set up to only return positives ...
Actually, that's just the delta calc. I'll need to analyze my outputsFri, 03 Jan 2020 01:35:29 GMTDehLeprechaunAnswer by Bunny83
http://answers.unity.com/answers/1688416/view.html
How did you come to this conclusion? Unity just uses the math functions of the .NET / Mono framework which directly map to the trigonometric methods implemented in the FPU / CPU hardware. You can be sure that Mathf.Sin does work exactly as it should be. If you do not get any negative values you simply do not pass in any angles which would cause a negative value. So your angle is between `0 - 180` and never between `180 - 360` or `-180 - 0` which would return a negative value.Fri, 03 Jan 2020 00:22:27 GMTBunny83