vectorToLocalFrame method

Vec3 vectorToLocalFrame(
  1. Vec3 worldVector, [
  2. Vec3? result
])

Convert a world vector to local body frame

Implementation

Vec3 vectorToLocalFrame(Vec3 worldVector,[Vec3? result]){
  result ??= Vec3();
  quaternion.conjugate().vmult(worldVector, result);
  return result;
}