scamp.utilities.round_to_multiple

scamp.utilities.round_to_multiple(x, factor)[source]

Returns the multiple of factor that is closest to x (above or below). The first argument can optionally be a list, tuple, or iterator, in which case this is performed on each element.