toAngleAxis changes Vector3f

Hello. This has probably been up before but I couldn't come up with the right search words to find it, or there wasn't anything to be found.



When using Quaternion.toAngleAxis(Vector3f axis); the input vector is affected.



When building and running this:


Vector3f vector = new Vector3f(0,1,0);
        new Quaternion().toAngleAxis(vector);
        System.out.println(vector);



I get this:

com.jme.math.Vector3f [X=1.0, Y=0.0, Z=0.0]

What is happening to the vector and why?

The vector you supply is being filled.  The method does not alter the Quaternion, instead the quaternion is expressing itself as an angle (float returned) and an axis the angle is rotating about (placed into the supplied vector.)

Ok thanks. I thought I was asking the quaternion: how much are you rotated around the Y axis? The Y axis supplied with the input vector.