mirror of
https://github.com/2006-Scape/Parabot.git
synced 2026-07-07 16:49:10 +00:00
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:
@@ -105,7 +105,18 @@ public class Timer {
|
|||||||
* @return hourly gains
|
* @return hourly gains
|
||||||
*/
|
*/
|
||||||
public int getPerHour(final int gained) {
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user