Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Math.Truncate() equivalent?

0 views
Skip to first unread message

LEM

unread,
Oct 26, 2007, 4:11:41 PM10/26/07
to

Hi,

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

Thanks

Tavo

unread,
Oct 27, 2007, 5:01:25 AM10/27/07
to

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

unread,
Oct 30, 2007, 9:12:08 AM10/30/07
to

Thanks Gustavo.
0 new messages