Page 1 of 1

Double

Posted: Tue Nov 04, 2008 2:58 pm
by Kjell
:shock:

Scores above 10 million start to crack up as all floats are of the type Single. Right now I'm using 2 variables as a solution, one holding the number of millions you've scored and another for the digits up to a million. But doubles would be nice .. or Int64 :)

Low priority though.

K

Posted: Tue Nov 04, 2008 6:21 pm
by kattle87
Using double creates a larger executable :) 1kb more I think. Plus, do you need 1Milion with 1 point "resolution"? Pheraps you could use smaller number then use the multiplier when displaying.

Posted: Tue Nov 04, 2008 6:47 pm
by Kjell
Salve Francesco,

Yea, that's what I tried at first as well. The multiplier however actually multiplies the value ( makes sense ), so you end up with a float that exceeds the precision of a single again. Using doubles doesn't make the executable any bigger afaik .. it's one of the base types supported by Delphi, it just uses double the memory compared to a single. Anyway, it's no big deal .. the 2 variable solution works, which is good enough :wink:

K

Posted: Tue Jul 27, 2010 12:40 pm
by Kjell
Bump ~

Although the original argument is no longer valid ( intToStr ) .. calculating and passing entire texture matrices to shaders is a bit cumbersome. Full matrix + pointer support would obviously be the ideal solution, but being able to call glFrustum / glOrtho would be a huge help.

Along with other uses obviously ( Game Maker Extensions ).

K