gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Newbie question

#3976 - Andy - Fri Mar 14, 2003 9:20 am

Dear all,

I 'm learning HAM, and I want to make some calculation then show the result on the screen (just like a calculator). However, I don't know how to display the decimal number, would anyone give me a hint?
for example:
result= 4/3; then I want to show "1.3333333" on the screen only.

Thanks.

Andy
_________________
Keep smile

#3977 - Daikath - Fri Mar 14, 2003 9:21 am

You would need a float kind of integer for decimals.

But the GBA doesnt do those nativly and has to emulate those wich is slow, is speed a factor in this though? If it isn't I would use a float.
_________________
?There are no stupid questions but there are a LOT of inquisitive idiots.?

#3979 - Peter - Fri Mar 14, 2003 11:12 am

you might wanna take a look at this:
http://www.ngine.de/modules.php?op=modload&name=Forums&file=viewtopic&topic=72&forum=1

#4058 - Andy - Mon Mar 17, 2003 10:33 am

Thank you very much.
_________________
Keep smile