Movement against float.init being nan
IGotD-
nise at nise.com
Sun Aug 21 09:09:14 UTC 2022
On Sunday, 21 August 2022 at 03:26:55 UTC, Walter Bright wrote:
>
> I find this surprising. My experience with floating point
> coordinates is you can never quite get the pixels aligned, due
> to rounding problems.
That's the whole point. In graphics and especially 3D graphics
use floating point in order to achieve sub pixel accuracy. That
means it uses the fractional part to draw more accurate lines for
example. It can be used for anti antialiasing calculations and so
on. Without subpixel accuracy we would experience more "steppy"
movement in 3D games for example. This can be observed in early
3D games which only used integer calculations.
More information about the Digitalmars-d
mailing list