get decimal

so if I have 5.2 it will return 2 or if I have 5 it will return 0 ect. I think there is a command in flash but if not how could I make a function to do it.

Max
LVL 4
TheMaximumWeaselAsked:
Who is Participating?
 
RoonaanConnect With a Mentor Commented:
function getDecimal(num) {
    return num - Math.floor(num);
}

-r-
0
 
TheMaximumWeaselAuthor Commented:
thanks

Max
0
All Courses

From novice to tech pro — start learning today.