diff --git a/src/java/com/threerings/util/DirectionUtil.java b/src/java/com/threerings/util/DirectionUtil.java index 8e9cd446e..563738249 100644 --- a/src/java/com/threerings/util/DirectionUtil.java +++ b/src/java/com/threerings/util/DirectionUtil.java @@ -1,5 +1,5 @@ // -// $Id: DirectionUtil.java,v 1.7 2002/07/02 23:15:53 shaper Exp $ +// $Id: DirectionUtil.java,v 1.8 2003/02/12 07:22:04 mdb Exp $ package com.threerings.util; @@ -107,6 +107,14 @@ public class DirectionUtil implements DirectionCodes return direction; } + /** + * Returns the opposite of the specified direction. + */ + public static int getOpposite (int direction) + { + return rotateCW(direction, FINE_CW_ROTATE.length/2); + } + /** * Returns which of the eight compass directions that point * b lies in from point a as one of the