001package fr.aumgn.bukkitutils.geom; 002 003/** 004 * Represents a direction. 005 */ 006public interface Direction { 007 008 float getYaw(); 009 010 float getPitch(); 011 012 Vector2D getVector2D(); 013 014 Vector getVector(); 015 016 Direction rotate(float angle); 017 018 public static final Direction NONE = new Direction() { 019 @Override 020 public Vector2D getVector2D() { 021 return new Vector2D(); 022 } 023 024 @Override 025 public Vector getVector() { 026 return new Vector(); 027 } 028 029 @Override 030 public float getYaw() { 031 return Float.NaN; 032 } 033 034 @Override 035 public float getPitch() { 036 return Float.NaN; 037 } 038 039 @Override 040 public Direction rotate(float angle) { 041 return NONE; 042 } 043 044 @Override 045 public int hashCode() { 046 return 41; 047 } 048 }; 049}