Anut-py / h-raylib

Haskell bindings for Raylib
https://hackage.haskell.org/package/h-raylib
Apache License 2.0
80 stars 13 forks source link

Pure version of `getScreenToWorld2D` function in rcore #50

Closed futu2 closed 5 months ago

futu2 commented 5 months ago

in Raylib.Core module, getScreenToWorld2D :: Vector2 -> Camera2D -> IO Vector2 but it is theoretically a pure computation, and pure version is always easier to compose. Should we add something like sreenToWorld2D :: Vector2 -> Camera2D -> Vector2? screenToWorld2D v c = unsafePerformIO $ getScreenToWorld2D v c

Anut-py commented 5 months ago

Published in 5.1.3.0