Skip to content

Instantly share code, notes, and snippets.

@OswaldHurlem
Created October 26, 2017 09:45
Show Gist options
  • Save OswaldHurlem/20acb2dd5dd69fff19a661239f3a8de4 to your computer and use it in GitHub Desktop.
Save OswaldHurlem/20acb2dd5dd69fff19a661239f3a8de4 to your computer and use it in GitHub Desktop.
using UnityEngine;
namespace OH.Ext
{
public static class OHVectorToUnityIntVector
{
public static Vector2Int ToVector2Int(this VectorI2 v)
{
return new Vector2Int(v.x, v.y);
}
public static Vector3Int ToVector3Int(this VectorI3 v)
{
return new Vector3Int(v.x, v.y, v.z);
}
public static VectorI2 ToVectorI2(this Vector2Int v)
{
return OHV.MkVectorI2(v.x, v.y);
}
public static VectorI3 ToVectorI3(this Vector3Int v)
{
return OHV.MkVectorI3(v.x, v.y, v.z);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment