ComponentsToDirection() public static method

public static ComponentsToDirection ( int x, int y ) : Direction
x int
y int
return Direction
Example #1
0
        public Direction ToDirection()
        {
            DoubleVector3 v = Normalize();

            int x = MyMath.Round(v.X);
            int y = MyMath.Round(v.Y);
            int z = MyMath.Round(v.Z);

            return(DirectionExtensions.ComponentsToDirection(x, y, z));
        }
Example #2
0
        public Direction ToDirection()
        {
            IntVector2 v = Normalize();

            return(DirectionExtensions.ComponentsToDirection(v.X, v.Y));
        }