Experiment with new enhanced precision values

This commit is contained in:
Travis Nickles 2018-12-14 03:54:26 -06:00
parent c2d26f30ce
commit d54f449b02

View File

@ -839,28 +839,28 @@ namespace DS4Windows
if (absX <= 0.4) if (absX <= 0.4)
{ {
outputX = 0.545 * absX; outputX = 0.544 * absX;
} }
else if (absX <= 0.75) else if (absX <= 0.75)
{ {
outputX = absX - 0.182; outputX = absX - 0.1824;
} }
else if (absX > 0.75) else if (absX > 0.75)
{ {
outputX = (absX * 1.728) - 0.728; outputX = (absX * 1.7296) - 0.7296;
} }
if (absY <= 0.4) if (absY <= 0.4)
{ {
outputY = 0.545 * absY; outputY = 0.544 * absY;
} }
else if (absY <= 0.75) else if (absY <= 0.75)
{ {
outputY = absY - 0.182; outputY = absY - 0.1824;
} }
else if (absY > 0.75) else if (absY > 0.75)
{ {
outputY = (absY * 1.728) - 0.728; outputY = (absY * 1.7296) - 0.7296;
} }
dState.RX = (byte)(outputX * signX * 127.5 + 127.5); dState.RX = (byte)(outputX * signX * 127.5 + 127.5);