Groups | Blog | Home
all groups > dotnet compact framework > october 2007 >

dotnet compact framework : Math.Truncate() equivalent?



LEM
10/26/2007 4:11:41 PM

Hi,

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

Thanks
Tavo
10/27/2007 12:00:00 AM
[quoted text, click to view]

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.
LEM
10/30/2007 9:12:08 AM

Thanks Gustavo.


[quoted text, click to view]
AddThis Social Bookmark Button