• MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    14
    ·
    edit-2
    3 days ago

    Say, you have a turn-based game where units move on a grid. … Then you realize that the move finishes exactly when the position of the unit coincides with the target cell’s center.

    I mean, something like inbetween(target - cellRadius, target + cellRadius), no?

    And of course you first (and generally) convert the floating points to units you can actually work with, why is this even a question? Anyone who knew KSP as more than a rocket explosion simulator, learned that lession long ago from the Kraken.

    • Blue_Morpho@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      3 days ago

      That’s one case study. He lists many more where throwing an epsilon at a floating point problem is the wrong solution.