npm.io
1.0.1 • Published 8 years ago

@gamestdio/mathf

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0
Stars
22

@gamestdio/mathf

A collection of common math functions for JavaScript/TypeScript.

Installation

npm install @gamestdio/mathf

Usage

import { lerpAngle, rad2Deg } from "@gamestdio/mathf";

let targetAngle = Math.PI * rad2Deg;
sprite.rotation = lerpAngle(sprite.rotation, targetAngle, 0.1);

References

License

MIT