Initial commit
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class Utility {
|
||||
static RandomIntegerBetween(minimum, maximum) {
|
||||
return Math.floor(Math.random() * (maximum - minimum + 1) + minimum);
|
||||
}
|
||||
|
||||
static IsInDistance(basePoint, targetPoint, range) {
|
||||
return (basePoint.x - targetPoint.x) ** 2 + (basePoint.y - targetPoint.y) ** 2 <= range ** 2;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = Utility;
|
||||
Reference in New Issue
Block a user