Mercurial > hg > ccmieditor
diff java/src/uk/ac/qmul/eecs/ccmi/gui/Direction.java @ 3:9e67171477bc
PHANTOM Omni Heptic device release
author | Fiore Martin <fiore@eecs.qmul.ac.uk> |
---|---|
date | Wed, 25 Apr 2012 17:09:09 +0100 |
parents | 9418ab7b7f3f |
children | d66dd5880081 |
line wrap: on
line diff
--- a/java/src/uk/ac/qmul/eecs/ccmi/gui/Direction.java Mon Feb 06 12:54:06 2012 +0000 +++ b/java/src/uk/ac/qmul/eecs/ccmi/gui/Direction.java Wed Apr 25 17:09:09 2012 +0100 @@ -56,6 +56,12 @@ q.getY() - p.getY()); } + /** + * Checks whether the direction passed as argument is parallel to this direction. + * + * @param d the direction to check against + * @return {@code true} if this direction and {@code d} are parallel to each other, false otherwise + */ public boolean isParallel(Direction d){ if(equals(d.x,d.y,DELTA)||turn(180).equals(d.x,d.y,DELTA)) return true;