public static void Copy(GenericX source, GenericX target) { target.x = source.x; target.y = source.y; target.z = source.z; target.w = source.w; target.type = source.type; }
public static bool Compare(GenericX a, GenericX b) { return ((a.type == b.type) && (a.x == b.x) && (a.y == b.y) && (a.z == b.z) && (a.type != XType.Quaternion || a.w == b.w)); }
public void OverwriteRotation(ref GenericX targetRotation) { if (type == XType.Quaternion || type == XType.XYZ) { targetRotation = this; } else { Debug.Log(Time.time + " OverwriteRotation " + type); targetRotation.x = (IsX) ? x : targetRotation.x; targetRotation.y = (IsY) ? y : targetRotation.y; targetRotation.z = (IsZ) ? z : targetRotation.z; } }