Hey,
Just want to know if anyone has come up with a conversion system for inches to feet in DM. I have an input in my game in progress, and need the inches to calculate "something". But I want to have the height displayed in feet (ie. 6'1"). I will need this for one of my stat panels. If you could help me out with this I would be very greatful. Thanks.
Plagu3r
ID:168324
Nov 3 2005, 9:14 am
|
|
In response to PirateHead
|
|
Maybe I should have thought a bit more. Thanks though.
|
In response to PirateHead
|
|
Or you could've done it like this.
#define inches2feet(inches) "[round(inches/12)]'[inches%12]''"
I like mine better, it's shorter. You were right though, who can't figure out a way to convert inches to feet, especially with a program. Perhaps he's 7 years old. In that case, I congragulate him with his typing, it's not bad at all for his age. (Hypothetically speaking, that is.) If you want to convert it back, though... Do this. I can't think of a way to #define it, so I'll just use a normal proc. proc/feet2inches(string) You know, just in case you want it. |
#define feet2inches(inches) "[((inches)-(inches)%12)/12]'[(inches)%12]''"