mathematical variabile for truncation function

mathematical variabile for truncation function

Hi to everybody,
I need to define two mathematical variables whose values must be the quotient and the remainder of an integer division.
In particular I have a UINT variable: Seconds.
Its value can be more that 60. I need convert it in minutes and seconds.
I created two MATH32 REAL variables:
Mins=X1/60
Secs= X1%60
Where
X1=Seconds
Secs is OK while Mins not! Because X1/60 make an approximation and not a truncation!
I tried others tricks like comparison with remainder o by subtracting 30 seconds from X1 but when X1 is lower than 30sec I get the value "-0"!!! And this is not good for me!
What have I to do?

This is a migrated post! Originally posted on 19.02.2010 by user zenmyway. Please be aware that information can be outdated.