Skip to navigation
Java round
02.05.22
public static double round(double value, int places) { if (places < 0) throw new IllegalArgumentException(); long factor = (long) Math.pow(10, places); value = value * factor; long tmp = Math.round(value); return (double) tmp / factor; }
Reply
Anonymous
Information Epoch 1732506909
ACID (Atomicity, Consistency, Isolation, and Durability)
Home
Notebook
Contact us