Test for a decimal (Figured out)
Posted: Wed Sep 30, 2009 10:45 pm
ok, I'm using Game Editor to create a calculator that converts our standard numbers into Mayan numerals (for a science/computer fair). I have the basic layout done, but I need a function that can tell if a number is a decimal number (Real numbers). Thanks in advance.
If you don't understand waht I mean by my problem, or how I am going to set this up, some example code would be
Edited: Never mind, i figured it out. I didn't need to use decimals, I was using the wrong rounding code (was using ceil instead of floor)
If you don't understand waht I mean by my problem, or how I am going to set this up, some example code would be
- Code: Select all
if((numbers.textNumber / 20) = //then the code to find the decimal)
{
// other text
}
Edited: Never mind, i figured it out. I didn't need to use decimals, I was using the wrong rounding code (was using ceil instead of floor)