GH_MathUtil

public sealed class GH_MathUtil

Methods

WrapInteger

#
public static int WrapInteger(int number, int lower, int upper)
Make sure a value is within the lower~upper domain. Works like MOD except it performs ok on negative values
number (int)Value to remap.
lower (int)Lower inclusive limit of remapping domain.
upper (int)Upper exclusive limit of remapping domain.

WrapInteger

#
public static int WrapInteger(int X, int upper)
Make sure a value is within the 0~upper domain. Works like MOD except it performs ok on negative values
X (int)value to remap
upper (int)upper exclusive limit of remapping domain