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:
parent
31f938a8fb
commit
4fe2261a99
@ -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{{{
|
||||||
|
Loading…
Reference in New Issue
Block a user