using UnityEngine;
namespace XGame.Database
{
public static class VectorUtils
{
/////
///// Vector3 -> Vec3 ΅Δ±ΆΚύ
/////
//public static readonly int Multiple = 1000;
#region Vec3
///
/// Vec3 -> Vector3
///
///
///
public static Vector3 ToVector3(this Vec3 vec)
{
return new Vector3(vec.X, vec.Y, vec.Z);
}
///
/// Vec3 -> Vector3Int
///
///
///
public static Vector3Int ToVector3Int(this Vec3 vec)
{
return Vector3Int.RoundToInt(new Vector3(vec.X, vec.Y, vec.Z));
}
#endregion
#region Vec2
///
/// Vec2 -> Vector2
///
///
///
public static Vector2 ToVector2(this Vec2 vec)
{
return new Vector2(vec.X, vec.Y);
}
///
/// Vec2 -> Vector2Int
///
///
///
public static Vector2Int ToVector2Int(this Vec2 vec)
{
return Vector2Int.RoundToInt(new Vector2(vec.X, vec.Y));
}
#endregion
}
}