double d = 3.99; int i = (int)d; size(100, 100); background(100); textSize(32); text(i, 15, 30); textSize(10); text("converting doubles to integers causes the decimal to be truncated", 5, 38, 80, 80);