示例#1
0
/**
 * vsg_vector3@t@_square_norm:
 * @vec: a #VsgVector3@t@
 *
 * Computes square of Euclidean norm of @vec: x*x+y*y+z*z.
 *
 * Returns square of @vec norm.
 */
@type@ vsg_vector3@t@_square_norm (const VsgVector3@t@ *vec)
{
#ifdef VSG_CHECK_PARAMS
  g_return_val_if_fail (vec != NULL, 0);
#endif

  return vsg_vector3@t@_square_norm_inline (vec);
}
示例#2
0
文件: .c 项目: pigay/vsg
/**
 * vsg_quaternion@t@_square_norm:
 * @quat: a #VsgQuaternion@t@
 *
 * Computes vsg_quaternion@t@_dotp(@quat, @quat).
 *
 * Returns: dot product of @quat by @quat.
 */
@type@ vsg_quaternion@t@_square_norm (const VsgQuaternion@t@ *quat)
{
#ifdef VSG_CHECK_PARAMS
  g_return_val_if_fail (quat != NULL, 0);
#endif

  return vsg_quaternion@t@_square_norm_inline (quat);

}