2
0
mirror of https://github.com/team2059/Zaphod synced 2024-12-18 20:12:28 -05:00

Tried to clean up potToDegrees. Untested.

This commit is contained in:
Austen Adler 2014-03-27 19:28:57 -04:00
parent 31f938a8fb
commit 4fe2261a99

View File

@ -165,13 +165,11 @@ public:
} }
//}}} //}}}
//potToDegrees{{{ //potToDegrees{{{
//TODO: Test this!
float potToDegrees(float a) { float potToDegrees(float a) {
float max = -.0003948; float max = -.0003948;
float min = 5.0245547; float min = 5.0245547;
float b = a - max; return 300-(a*(300/(min-max)));
min = min - max; // ~5.0027
max = max - max; //=0
return 300 - ((b + max) * (300 / min));
} }
//}}} //}}}
//cvt{{{ //cvt{{{