decimals
Displaying 1-8 of 8 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
RageCage

I can live with not being to store decimals but not even being able to process them to some extent? not cool....

Posted on 2004-03-12 01:01:46

Shadow64

If you look at the script in my ShadowClock Demo (Version 2.0) and you examine the way the hands move, you'll see how I dealt with decimals.

It's pretty much always been this way, if you want .5 you're going to have to do this (5/10) and even sometimes that doesn't work

I hope that helps.

Posted on 2004-03-13 22:15:03

TomT64

Also you can bitshift. 65536=1.0 if you bitshift by 16. Examples can be found in the Spaceflight demo

Posted on 2004-03-14 01:40:39

RageCage

oh, its not that I cant deal with the decimal processing, its just that I dont like having to put in extra math. =p

Posted on 2004-03-15 00:25:56

Toen

Floats are coming. Chill, nephew.

Posted on 2004-03-22 02:28:11

mcgrue

I don't think they're coming anytime soon, tho. You may just want to add the math.

I tend to multiply whatever's being divided by 100 beforehand, and divide it by 100 after all the other math is done.

(I think, at least, I'd have to crack open the code where I do this to verify.)

Posted on 2004-03-22 18:31:49

RageCage

well you dont want to assume its always going to 100, you need to multiply it by how ever much is the maximum it should ever be.

Posted on 2004-03-22 23:24:20

mcgrue

I use 100 because I usually only want two points of precision. You can, of course, use any number as long as you divide by it later.

Use 1337 if you want to feel special. And I mean short-bus special.

Posted on 2004-03-23 06:36:06


Displaying 1-8 of 8 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.