help with float
in
Programming Questions
•
4 months ago
float total = 1.20;
PFont v;
void setup() {
size(1400, 700);
smooth ();
println(PFont.list());
v = createFont("Vijay Bold", 35);
textFont(v);
}
void draw() {
fill(0);
text("the price is £", ( 100), 100);
text(total, 300, 100);
delay(500);
}
void price() {
fill(0);
text("the price is £", ( 100), 100);
text(total, 300, 100);
delay(500);
}
text(total, 300, 100);
delay(500);
}
when I run this code I get
"the price is £1.200"
I need it to say
"the price is £1.20
can any one help me with this
thanks for your time
1