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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top