MathCG
Description
Chivalrous Games Math helper.
Methods
IsVector3Between
public static bool IsVector3Between(Vector3 toCheck, Vector3 boundary1, Vector3 boundary2);
Parameters
toCheck | Vector3 | Vector3 to check. |
boundary1 | Vector3 | First Vector3 Boundary. |
boundary2 | Vector3 | Second Vector3 Boundary. |
Return
bool | True if vector3 toCheck is between the specified boundary1 and boundary2; otherwise, false. |
Description
Determines if vector3 toCheck is between the specified boundary1 and boundary2.
CalculateDiamondRange
public static int CalculateDiamondRange(Point origin, Point target);
Parameters
origin | Point | Origin |
target | Point | Target |
Return
An int representing the diamond range.
Description
Calculates the diamond range. (See user guide to get an explanation on ranges)
IsTargetWithinDiamondRange
public static bool IsTargetWithinDiamondRange(Point origin, Point target, int range);
Parameters
origin | Point | Origin |
target | Point | Target |
range | int | Range |
Return
true if this target is within diamond range of the origin; otherwise, false
Description
Determines whether this target is within diamond range of the origin. (See user guide to get an explanation on ranges)
CalculateSquareRange
public static int CalculateSquareRange(Point origin, Point target);
Parameters
origin | Point | Origin |
target | Point | Target |
Return
An int representing the square range.
Description
Calculates the square range. (See user guide to get an explanation on ranges)
IsTargetWithinSquareRange
public static bool IsTargetWithinSquareRange(Point origin, Point target, int range);
Parameters
origin | Point | Origin |
target | Point | Target |
range | int | Range |
Return
true if this target is within square range of the origin; otherwise, false
Description
Determines whether this target is within square range of the origin. (See user guide to get an explanation on ranges)
CalculateRoundRange
public static int CalculateRoundRange(Point origin, Point target);
Parameters
origin | Point | Origin |
target | Point | Target |
Return
An int representing the round range.
Description
Calculates the round range. (See user guide to get an explanation on ranges)
IsTargetWithinRoundRange
public static bool IsTargetWithinRoundRange(Point origin, Point target, int range);
Parameters
origin | Point | Origin |
target | Point | Target |
range | int | Range |
Return
true if this target is within round range of the origin; otherwise, false
Description
Determines whether this target is within round range of the origin. (See user guide to get an explanation on ranges)