mirror of
https://github.com/ShikyC/Taiko-Drum-Controller-Arduino.git
synced 2024-11-23 22:10:58 +01:00
No need to use pow() here
This commit is contained in:
parent
0b588ea3cb
commit
56a379b7c4
@ -126,10 +126,7 @@ void loop() {
|
||||
}
|
||||
lastPower[p][i] = power[p][i];
|
||||
#else
|
||||
float x2 = sensitivities[p][i] * sensitivities[p][i];
|
||||
float x3 = x2 * sensitivities[p][i];
|
||||
float x4 = x3 * sensitivities[p][i];
|
||||
float v = power[p][i] * (1.0 + sensitivities[p][i] + 0.5 * x2 + 0.166667 * x3);
|
||||
float v = power[p][i] * sensitivities[p][i];
|
||||
axisValues[p][i] = AXIS_RANGE * (v >= MAX_THRES ? 1 : (v / MAX_THRES));
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user