Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I understood the reference, I laughed at the reference.

But I was talking about something else.

These artifacts can be derived procedurally.

The creators of modern development tools have made this process somewhat more complicated:

    var num1: PackedFloat64Array = [0.2, 0.1]

    var summ1: float = num1[0] + num1[1]

    print(summ1) # 0.3

    print(summ1 - (0.2 + 0.1)) # 0

But if we reduce the accuracy of the calculations:


    var num2: PackedFloat32Array = [0.2, 0.1]

    var summ2: PackedFloat32Array = [num2[0] + num2[1]]

    print(summ2[0]) # 0.30000001192093

    print(summ2[0] - (0.2 + 0.1)) # 0.00000001192093