You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
328 B
20 lines
328 B
3 years ago
|
package com.entryrise.afkguard.utils;
|
||
|
|
||
|
public class MathUtils {
|
||
|
|
||
|
public static int toMegaByte(long bytes) {
|
||
|
return (int) (bytes / 1048576);
|
||
|
}
|
||
|
|
||
|
public static boolean isInt(String str) {
|
||
|
try {
|
||
|
int d = Integer.parseInt(str);
|
||
|
d = d + 1;
|
||
|
} catch (NumberFormatException nfe) {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
}
|