Bits and Bytes
8
I needed these for a recent project, bits and bytes constants.
private static final double BITS_KILLA = 1000;
private static final double BITS_MEGA = Math.pow(BITS_KILLA, 2);
private static final double BITS_GIGA = Math.pow(BITS_KILLA, 3);
private static final double BITS_TERRA = Math.pow(BITS_KILLA, 4);
private static final double BITS_PETA = Math.pow(BITS_KILLA, 5);
private static final double BYTES_KILLA = 1024;
private static final double BYTES_MEGA = Math.pow(BYTES_KILLA, 2);
private static final double BYTES_GIGA = Math.pow(BYTES_KILLA, 3);
private static final double BYTES_TERRA = Math.pow(BYTES_KILLA, 4);
private static final double BYTES_PETA = Math.pow(BYTES_KILLA, 5);






There are currently no comments for this snippet.