wrap

public final static Double wrap(Double n, Double min, Double max)

Ensures that n lies in the range min..max, where min and max are modularly-equivalent (that is, n wraps around).


public final static Integer wrap(Integer n, Integer min, Integer max)

Ensures that n lies in the range min..max, where min and max are modularly-equivalent (that is, n wraps around).