Float help!
#1

i have a float value: 0.33412359.
And i want to show this float 0.3 or 0.33! Help me
Reply
#2

Try %.2f
Reply
#3

&f replace by %0.2f
Reply
#4

pawn Код:
new Float: myFloat = 0.33412359;

printf("Original value: %f", myFloat);
printf("Only 1 number: %.1f", myFloat);
printf("Only 2 numbers: %.2f", myFloat);
pawn Код:
//Prints:/*
Original value: 0.334123
Only 1 number: 0.3
Only 2 numbers: 0.33
*/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)