A force based on the square of the thing's velocity. It's like velocityForce, but here the velocity has a bigger impact.
const thing = { position: { x: 0.5, y:0.5 }, velocity: { x: 0.001, y:0 }};const drag = magnitudeForce(0.1);// Apply drag force to thing, returning resultconst t = Forces.apply(thing, drag); Copy
const thing = { position: { x: 0.5, y:0.5 }, velocity: { x: 0.001, y:0 }};const drag = magnitudeForce(0.1);// Apply drag force to thing, returning resultconst t = Forces.apply(thing, drag);
Force value
How to factor in mass
Function that computes force
A force based on the square of the thing's velocity. It's like velocityForce, but here the velocity has a bigger impact.