litecanvas / game-engine

🎮 Lightweight HTML5 canvas engine suitable for small games, prototypes and animations.
https://litecanvas.js.org/
MIT License
30 stars 4 forks source link

Add fract() #15

Closed luizbills closed 6 months ago

luizbills commented 6 months ago
// Returns the fractional part of a number
const fract = (n) => n % 1
luizbills commented 6 months ago

Usage:

https://litecanvas.js.org?c=eJxdjjELwjAQhff8iluEi1SsurgoiA0oiIgW1DGkKQ2EtDRXM4j%2F3bTFxeXe97jH3bOGtJLuJT1yxlTtPEHZSkWwAXQcNltwkwVjZecUmdpB0cqAHN4MoM%2BI0%2B5yE1l0ynpMeYSm8xX2QK103krSuBfnXFwfCYzw7LfWOB1MQRWu4%2BfoNUGIF%2B%2FHLD%2FAdGyB9ItiVIBZmC%2BTgdJR%2Fv0qzuFcUzexxOcLsgQ5QA%3D%3D