25-07-08 - Today I Learned...
Today I learned about acceleration and how to use the device acceleration in p5.js
Acceleration is the rate at which velocity changes over time.
Acceleration = Change in velocity / time taken
Speeding up -> positive acceleration Slowing down -> negative acceleration
for current acceleration you can use
accelerationX,accelerationY,accelerationZ
for previours frames acceleration you can use
pAccelerationX,pAccelerationY,pAccelerationZ
To limit the length of the float value use accelerationX.toFixed(2)
.