More work on alphabet editor
This commit is contained in:
@@ -78,7 +78,7 @@ class CoolUtil
|
||||
|
||||
/**
|
||||
* Applies the % operator, but without any negatives.
|
||||
*
|
||||
*
|
||||
* @param dividend The intial value. The left side of the equation.
|
||||
* @param divisor What to modulo by. The right side of the equation.
|
||||
* @return A positive reminder of `dividend / divisor`.
|
||||
@@ -87,6 +87,17 @@ class CoolUtil
|
||||
return ((dividend % divisor) + divisor) % divisor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies the % operator, but without any negatives. But it's an int.
|
||||
*
|
||||
* @param dividend The intial value. The left side of the equation.
|
||||
* @param divisor What to modulo by. The right side of the equation.
|
||||
* @return A positive reminder of `dividend / divisor`.
|
||||
*/
|
||||
public static inline function positiveModuloInt(dividend:Int, divisor:Int) {
|
||||
return ((dividend % divisor) + divisor) % divisor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shortcut to parse JSON from an Asset path
|
||||
* @param assetPath Path to the JSON asset.
|
||||
|
||||
Reference in New Issue
Block a user