How do I remove the decimals from a number without rounding?

Pete

Why "without rounding"? Something like this, maybe?

double x = 3.1415926;

x = (int)x;

Paul T.

Quote:> How do I remove the decimals from a number without rounding?

> Pete

Hi,

Something else that may be (more) useful to you is

modf() (in the standard math library).

Hope this helps...

Almon B. Strowger

KOOK Pocket Software

> Why "without rounding"? Something like this, maybe?

> double x = 3.1415926;

> x = (int)x;

> Paul T.

> > How do I remove the decimals from a number without rounding?

> > Pete

Thanks for all the suggestions.

pete

> Hi,

> Something else that may be (more) useful to you is

> modf() (in the standard math library).

> Hope this helps...

> Almon B. Strowger

> KOOK Pocket Software

> > Why "without rounding"? Something like this, maybe?

> > double x = 3.1415926;

> > x = (int)x;

> > Paul T.

> > > How do I remove the decimals from a number without rounding?

> > > Pete

DDX_Text(pDX, IDC_EXTENSIONf1, m_TOTAL[0]);

m_TOTAL is a double. Is there a simple way to show 2 decimal places

even if they are 0's

i.e. shows 10.00 rather than 10.

2. NET-Install

3. Want to remove item placed in toolbar

4. Ge Force2 MX 400 Video Card

5. How do you remove entries from MY NETWORK PLACE?

6. Need help restoring vpn network settings

7. How can I remove the 'My Network Places' icon

9. How do I remove Terminal Services and Web from Network places?

10. How to Remove comments on computer name in My Network Places

12. remove "My network Places"

13. Removing "My Network Places"

4 post • Page:**1** of **1**