using System;
using LeapInternal;
using UnityEngine;

namespace Leap.Unity
{
	public static class UnityQuaternionExtension
	{
		public static Quaternion ToQuaternion(this LeapQuaternion q)
		{
			return new Quaternion(q.x, q.y, q.z, q.w);
		}

		public static Quaternion ToQuaternion(this LEAP_QUATERNION q)
		{
			return new Quaternion(q.x, q.y, q.z, q.w);
		}

		public static LeapQuaternion ToLeapQuaternion(this Quaternion q)
		{
			return new LeapQuaternion(q.x, q.y, q.z, q.w);
		}

		public static LEAP_QUATERNION ToCQuaternion(this Quaternion q)
		{
			return new LEAP_QUATERNION
			{
				x = q.x,
				y = q.y,
				z = q.z,
				w = q.w
			};
		}
	}
}
