Norm of a Quaternion?

Please help me! In two books (Game Programming Gems, and 3D Game Engine Design), they say that the norm of a quaternion is :

N(q) = w^2 + x^2 + y^2 + z^2;

But on the net (on many web sites devoted to game programming), they say that the norm is:

N(q) = sqrt(w^2 + x^2 + y^2 + z^2);

So what is the norm of a quaternion?!?
thx!

Here’s some code to Normalize a Quaternion-

mag=sqrt(quat.w^2+quat.x^2+quat.y^2+quat.z^2)
quat.w=quat.w/mag
quat.x=quat.x/mag
quat.y=quat.y/mag
quat.z=quat.z/mag

Hi,

Quaternion is fourth deimension vector. So it’s a vector like another and it’s Euleur norm is sqrt(x^2+y^2+z^2+w^w^2). The formule to normalize the vector was given you by Sheepie.
When you use a quaternion for rotation, its norm must be the unit norm.

bye.

Hi,

Some mistakes: you must read
sqrt(x^2+y^2+z^2+w^2).

Sorry about that.

N(q) = w^2 + x^2 + y^2 + z^2; is the
NORM of q.

N(q) = sqrt(w^2 + x^2 + y^2 + z^2); is the MODULUS of q.

Here’s some code to Normalize a Quaternion-
mag=sqrt(quat.w^2+quat.x^2+quat.y^2+quat.z^2)
quat.w=quat.w/mag
quat.x=quat.x/mag
quat.y=quat.y/mag
quat.z=quat.z/mag