Quotes around otherwise ambiguous (underline containing) name
[geos.git] / src / geomgraph / Position.cpp
blobe99dfa719732cbb353b6c955097c13fdc95ba5c5
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>
22 #ifndef GEOS_DEBUG
23 #define GEOS_DEBUG 0
24 #endif
26 #ifdef GEOS_DEBUG
27 #include <iostream>
28 #endif
30 namespace geos {
31 namespace geomgraph { // geos.geomgraph
33 /**
34 * Returns LEFT if the position is RIGHT, RIGHT if the position is LEFT, or the position
35 * otherwise.
37 int Position::opposite(int position){
38 if (position==LEFT) return RIGHT;
39 if (position==RIGHT) return LEFT;
40 #if GEOS_DEBUG
41 std::cerr<<"Position::opposite: position is neither LEFT ("<<LEFT<<") nor RIGHT ("<<RIGHT<<") but "<<position<<std::endl;
42 #endif
43 return position;
46 } // namespace geos.geomgraph
47 } // namespace geos