Math.Truncate() equivalent?

  • Thread starter Thread starter LEM
  • Start date Start date
L

LEM

Hi,

I cannot find an equivalent in Compact Framework for this function.
Does it exist?

Thanks
 
Hi,

I cannot find an equivalent in Compact Framework for this function.
Does it exist?

Thanks

I checked now and find that really they have a truncate function in
the regular framework...

for positive numbers Math.Floor will give always the same resulta as
truncate. For negative numbers Math.Ceil will do the job...
you can make your own Truncate function using Floor or Ceil depending
on the positiveness of the value.

Gustavo.
 
Thanks Gustavo.

I checked now and find that really they have a truncate function in
the regular framework...

for positive numbers Math.Floor will give always the same resulta as
truncate. For negative numbers Math.Ceil will do the job...
you can make your own Truncate function using Floor or Ceil depending
on the positiveness of the value.

Gustavo.
 
Back
Top