public vec3 copyNormalized(vec3 a){
  float x=a.m[0];
  float y=a.m[1];
  float z=a.m[2];
  float s=1.0f / (float)Math.sqrt(x * x + y * y + z * z);
  this.m[0]=x * s;
  this.m[1]=y * s;
  this.m[2]=z * s;
  return this;
}

public vec3 copyNormalized ( vec3 a ) { float x = a . m [ 0 ] ; float y = a . m [ 1 ] ; float z = a . m [ 2 ] ; float s = 1.0f / ( float ) Math . sqrt ( x * x + y * y + z * z ) ; this . m [ 0 ] = x * s ; this . m [ 1 ] = y * s ; this . m [ 2 ] = z * s ; return this ; }
\ brief normalized copy of a
