A collection of common math functions for JavaScript/TypeScript.
npm install @gamestdio/mathf
import { lerpAngle, rad2Deg, deg2Rad } from "@gamestdio/mathf";
let targetAngle = Math.PI * rad2Deg;
sprite.rotation = lerpAngle(sprite.rotation * rad2Deg, targetAngle, 0.1) * deg2Rad;
MIT