public void toAxisAngle(Vector4f output){
  if (getW() > 1) {
    normalise();
  }
  float angle=2 * (float)Math.toDegrees(Math.acos(getW()));
  float x;
  float y;
  float z;
  float s=(float)Math.sqrt(1 - getW() * getW());
  if (s < 0.001) {
    x=points[0];
    y=points[1];
    z=points[2];
  }
 else {
    x=points[0] / s;
    y=points[1] / s;
    z=points[2] / s;
  }
  output.points[0]=x;
  output.points[1]=y;
  output.points[2]=z;
  output.points[3]=angle;
}

public void toAxisAngle ( Vector4f output ) { if ( getW ( ) > 1 ) { normalise ( ) ; } float angle = 2 * ( float ) Math . toDegrees ( Math . acos ( getW ( ) ) ) ; float x ; float y ; float z ; float s = ( float ) Math . sqrt ( 1 - getW ( ) * getW ( ) ) ; if ( s < 0.001 ) { x = points [ 0 ] ; y = points [ 1 ] ; z = points [ 2 ] ; } else { x = points [ 0 ] / s ; y = points [ 1 ] / s ; z = points [ 2 ] / s ; } output . points [ 0 ] = x ; output . points [ 1 ] = y ; output . points [ 2 ] = z ; output . points [ 3 ] = angle ; }
get an axis angle representation of this quaternion .
