Vector
Normalizing a vector means scaling it to make its norm 1. Just divide it by its norm.
def normalize(v): return v/sqrt(v*v)
Normalizing a vector means scaling it to make its norm 1. Just divide it by its norm.
def normalize(v): return v/sqrt(v*v)