addTime method

Quat addTime(
  1. Vec3 v,
  2. double t
)

Add time to the current Quant

Implementation

Quat addTime(Vec3 v, double t ){
  double ax = v.x, ay = v.y, az = v.z;
  double qw = w, qx = x, qy = y, qz = z;
  t *= 0.5;
  x += t * (  ax*qw + ay*qz - az*qy );
  y += t * (  ay*qw + az*qx - ax*qz );
  z += t * (  az*qw + ax*qy - ay*qx );
  w += t * ( -ax*qx - ay*qy - az*qz );
  normalize();
  return this;
}