/** * Gets the closest direction from the given vector. If the vector is the * 0-Vector, this method returns {@link #NONE}. If the vector has the same * horizontal and vertical length, a horizontal direction will be returned. * If the vector is halfway between two directions the clockwise next will * be selected. * * @param vector The vector to convert to a direction * @return The closest horizontal direction. */ public static Direction getClosest(Vector3d vector) { return getClosest(vector, Division.SECONDARY_ORDINAL); }
/** * Gets the closest direction from the given vector. If the vector is the * 0-Vector, this method returns {@link #NONE}. If the vector has the same * horizontal and vertical length, a horizontal direction will be returned. * If the vector is halfway between two directions the clockwise next will * be selected. * * @param vector The vector to convert to a direction * @return The closest horizontal direction. */ public static Direction getClosest(Vector3d vector) { return getClosest(vector, Division.SECONDARY_ORDINAL); }