// Cubie World shared fixed-point kernels (Q=10000). Host scales products by Q². fn velocityDelta(v: Int, target: Int, gain: Int): Int { return (target-v)*gain; } fn radialAcceleration(gravity: Int, normal: Int): Int { return -gravity*normal; } fn panelFlux(height: Int, target: Int, stiffness: Int, velocity: Int, damping: Int): Int { return (target-height)*stiffness-velocity*damping; } fn foldComponent(along: Int, oldNormal: Int, newNormal: Int): Int { return -along*oldNormal+newNormal; }