pshaughn / okayworld

backend for play.okayideas.com
0 stars 1 forks source link

convenience functions for strictmath #5

Open pshaughn opened 6 years ago

pshaughn commented 6 years ago

playset game logic shouldn't trust javascript math in many cases, and should generally restrict themselves to integers (power-of-2-denominators are okay but harder to verify). playsets.js needs a utility object to provide some useful integer-domain operations, truncing the input when passed a non-integer

pshaughn commented 6 years ago

geometry tests should go in here too, as games need them (an asteroids game with some exact triangle collisions seems like a good thing to do)

pshaughn commented 6 years ago

in progress (no atan2 or geometry tests yet)

pshaughn commented 6 years ago

added methods to iterate an object by ascending numeric keys (barely math, but it does involve numbers)