Created
October 26, 2017 09:45
-
-
Save OswaldHurlem/20acb2dd5dd69fff19a661239f3a8de4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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