Merge pull request #285 from AlexanderBielen/feature/paint-utils

Added class with functions that are frequently used for making paints
This commit is contained in:
Jeroen Ketelaar
2018-11-01 13:42:47 -05:00
committed by GitHub
@@ -105,7 +105,18 @@ public class Timer {
* @return hourly gains
*/
public int getPerHour(final int gained) {
return (int) ((gained) * 3600000D / (System.currentTimeMillis() - start));
return getPerHour(gained, 0);
}
/**
* Calculates hourly gains based on given variable, with variable start amount
*
* @param gained total gained amount
* @param startAmount start amount
* @return hourly gains
*/
public int getPerHour(final int gained, final int startAmount) {
return (int) (((gained - startAmount) * 3600000D) / (System.currentTimeMillis() - start));
}
/**