Simple linear rescaling of positions
rescale(pos, newmin = -1, newmax = 1, oldmin = min(pos), oldmax = max(pos))
position data to be rescaled
indicates the minimum of the new scale (default is -1)
indicates the maximum of the new scale (default is +1)
indicates the minimum of the existing scale. Can be used to rescale from a known theoretical scale (e.g. -100). If left empty the empirical minimum is used.
indicates the maximum of the existing. See above.