c96e46d3d4
* Add a method to convert cursor coords to pixel coords * Add method `window_pos_to_pixel` to Pixels struct * Converts cursor / window physical coordinates to pixel coords * Fix formatting * Return result rather than clamping pixel coordinates * Use transformation matrices to convert from cursor coord to pixel * Adds a struct ScalingMatrix that manages the creation and usage of the transformation matrix used in the renderer. * Added an inverse function on ScalingMatrix - 4x4 matrix inverse (This should probably use a library, but it doesn't seem worth adding a dependancy for one function) * Optimize matrix multiplication for cursor position calculation * Use ultraviolet for matrix and vector math * Add suggested changes This keeps the split between usize and isize This also changes the input cursor position to f32, because it was immediately cast to an f32 for the transformations. |
||
---|---|---|
.. | ||
conway | ||
invaders | ||
minimal-sdl2 | ||
minimal-winit |