Function getOppositeXYDirections

Returns the set of directions which are opposite to the given set of directions.

There are two sets of opposite pairs ("up"/"down" and "left"/"right") and at least one of the two opposing directions of a pair must be present for the other one to be included. If both directions that constitute a pair of opposites is given, then the other pair is returned instead (minus any that are present in the input). See examples below for clarification.

getOppositeXYDirections("up"); // -> ["down"]
getOppositeXYDirections("left"); // -> ["right"]
getOppositeXYDirections("up,down"); // -> ["left","right"]
getOppositeXYDirections("up,left"); // -> ["down","right"]
getOppositeXYDirections("up,left,right"); // -> ["down"]
getOppositeXYDirections("none"); // -> throws
getOppositeXYDirections("ambiguous"); // -> throws
getOppositeXYDirections("in"); // -> throws

LisnUsageError If the given view is not valid.