• 从事 Java项目工作的Im。
double totalPages;
int amountKits = 2;
totalPages = amountKits / 3;
System.out.println("Total pages before ceil: " + totalPages);
totalPages = Math.ceil(totalPages);
System.out.println("Amount of Kits: " + amountKits);
System.out.println("Total Pages: " + totalPages);
结果是:
Total pages before ceil: 0.0
Amount of Kits: 2
Total Pages: 0.0
Does anyone know why this is happening? (Sorry, I m a noob, I know)