# Normalize a vector to be between -1 and 1

I have an acceleration vector in m/s^2 and I am going to use an algorithm that assumes these values are between -1 and 1. I have searched the web and found formulas to get it between 0 and 1.

Especially this formula: $x' = \frac{x - \min}{\max - \min}$ but I think this will give me values between 0 and 1. I do know that $min = -max$, so $x' = \frac{x - \min}{2\cdot \max}$.

My math is really lacking, so I don't know how to get this value to be between -1 and 1.

-

If $x \in [0,1]$, then $2x-1 \in [-1,1]$.