rot.js icon indicating copy to clipboard operation
rot.js copied to clipboard

Vector support?

Open mount2010 opened this issue 9 years ago • 1 comments

I believe that having support for basic vector operations (dot, etc), which are used a lot in roguelike programming, especially since roguelikes typically use 2D grids a lot, will be helpful to have in a roguelike library.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40994872-vector-support?utm_campaign=plugin&utm_content=tracker%2F297828&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F297828&utm_medium=issues&utm_source=github).

mount2010 avatar Jan 16 '17 07:01 mount2010

This is a reasonable request. But please keep in mind that rot.js is built around the premise that no data structures are imposed on the developer; routines that return complex data structures use callbacks instead. So introducing a (fixed) vector data type would break this premise.

I would highly suggest using glMatrix for all your vector/matrix needs.

ondras avatar Jan 16 '17 07:01 ondras