Added getOpposite().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2273 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -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;
|
package com.threerings.util;
|
||||||
|
|
||||||
@@ -107,6 +107,14 @@ public class DirectionUtil implements DirectionCodes
|
|||||||
return direction;
|
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
|
* Returns which of the eight compass directions that point
|
||||||
* <code>b</code> lies in from point <code>a</code> as one of the
|
* <code>b</code> lies in from point <code>a</code> as one of the
|
||||||
|
|||||||
Reference in New Issue
Block a user