How to get 4 digit after dot

 

hi all and codeguru

sory for my bad english and i'm newbie in programming...

i get value from double() function like 1.75673456

and i want get only four digit after dot like 1.7567

how to get that ???

thanks for the answer

 

Hi Rayie

You can use NormalizeDouble function.

double NormalizeDouble( double value, int digits)

Rounds floating point number to specified decimal places.

Parameters

value - Floating point value.

digits - Precision format, number of digits after decimal point (0-8).

Aki

 

thanks aki...

but i don't how to use it, can you give me an example ??

my code : double ValueNormalize = Buffer

Buffer's value 8 digit and i want ValueNormalize 4 digit.

tx

 

i got it

thanks

Reason: