Jump to content

pixesl to yards


Recommended Posts

Use a globally accessible function to multiply by a constant coefficient - thereby converting between pixels and yards etc.

But if wanting to convert back from yards to pixels in a reliable way be mindful that, in programming, not all floating point coefficients are accurately reversible.

Another approach is to keep your game units independent of pixels, and only convert them to pixels when it's time to draw something involving pixels.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...