Jump to content

[SOLVED] Decimal Point Questions


pengu

Recommended Posts

Hey guys,

 

My friends and I have a project going on currently and one of our mates has designed a system up for leveling up, items and such. (oh it's a game project)

 

The way hes done it is with percent (which annoys me, but it's possible I'm sure), 1 being 100% 0.2 being 20% ect.

 

Now all values are stored in a database, we have a lot of calculations going on, so I want to make sure before the table is updated all values are 2 decimal points I think e.g 0.20 or 0.02 <- never go past those 2 digits.  Now I've seen float() used for this I believe?  Do all math kind of things have to be functions?

 

Cheers,

Pengu.

Link to comment
https://forums.phpfreaks.com/topic/167058-solved-decimal-point-questions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.