normalize method

Quat normalize()

Normalize the current Quant

Implementation

Quat normalize(){
  double l = length();
  if ( l == 0 ) {
    set( 0, 0, 0, 1 );
  }
  else {
    l = 1 / l;
    x = x * l;
    y = y * l;
    z = z * l;
    w = w * l;
  }
  return this;
}