ComponentsToDirection() public static méthode

public static ComponentsToDirection ( int x, int y ) : Direction
x int
y int
Résultat Direction
        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));
        }
Exemple #2
0
        public Direction ToDirection()
        {
            IntVector2 v = Normalize();

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