1 /**********************************************************************
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
6 * Copyright (C) 2001-2002 Vivid Solutions Inc.
7 * Copyright (C) 2005 Refractions Research Inc.
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
14 **********************************************************************
16 * Last port: geomgraph/Position.java rev. 1.4 (JTS-1.10)
18 **********************************************************************/
20 #include <geos/geomgraph/Position.h>
31 namespace geomgraph
{ // geos.geomgraph
34 * Returns LEFT if the position is RIGHT, RIGHT if the position is LEFT, or the position
37 int Position::opposite(int position
){
38 if (position
==LEFT
) return RIGHT
;
39 if (position
==RIGHT
) return LEFT
;
41 std::cerr
<<"Position::opposite: position is neither LEFT ("<<LEFT
<<") nor RIGHT ("<<RIGHT
<<") but "<<position
<<std::endl
;
46 } // namespace geos.geomgraph