~sharpie/geos/3.3.2

« back to all changes in this revision

Viewing changes to source/geomgraph/EdgeEnd.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Fabio Tranchitella
  • Date: 2006-11-06 21:35:52 UTC
  • mfrom: (3.1.3 feisty)
  • Revision ID: james.westby@ubuntu.com-20061106213552-m03o92ggj1na737b
Tags: 2.2.3-3
debian/control: move doxygen from build-depends-indep to build-depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**********************************************************************
2
 
 * $Id: EdgeEnd.cpp,v 1.3 2004/10/21 22:29:54 strk Exp $
 
2
 * $Id: EdgeEnd.cpp,v 1.3.2.2 2005/05/23 18:41:51 strk Exp $
3
3
 *
4
4
 * GEOS - Geometry Engine Open Source
5
5
 * http://geos.refractions.net
17
17
#include <geos/geomgraph.h>
18
18
#include <geos/util.h>
19
19
#include <typeinfo>
20
 
#include <math.h>
21
 
#include <stdio.h>
 
20
#include <cmath>
 
21
#include <sstream>
22
22
 
23
23
namespace geos {
24
24
 
103
103
}
104
104
 
105
105
string EdgeEnd::print() {
106
 
        char buffer[255];
107
 
        sprintf(buffer,"%i:%g",quadrant,atan2(dy,dx));
108
 
        string angleStr(buffer);
109
 
//      string className=typeid(*this).name();
110
 
        string className="EdgeEnd";
111
 
        string out="  "+className+": "+p0.toString()+" - "+p1.toString()+" ";
112
 
        out.append(angleStr);
113
 
        out+="   " + label->toString();
114
 
        return out;
115
 
}
116
 
 
117
 
}
 
106
        ostringstream s;
 
107
 
 
108
        s<<"EdgeEnd: ";
 
109
        s<<p0.toString();
 
110
        s<<" - ";
 
111
        s<<p1.toString();
 
112
        s<<" ";
 
113
        s<<quadrant<<":"<<atan2(dy,dx);
 
114
        s<<"  ";
 
115
        s<<label->toString();
 
116
 
 
117
        return s.str();
 
118
}
 
119
 
 
120
} // namespace geos
118
121
 
119
122
/**********************************************************************
120
123
 * $Log: EdgeEnd.cpp,v $
 
124
 * Revision 1.3.2.2  2005/05/23 18:41:51  strk
 
125
 * Replaced sprintf uses with ostringstream
 
126
 *
 
127
 *
 
128
 * Revision 1.3.2.1  2005/05/23 17:10:08  strk
 
129
 * Stricter C++ syntax (math.h=>cmath, ieeefp.h in "C" block)
 
130
 *
121
131
 * Revision 1.3  2004/10/21 22:29:54  strk
122
132
 * Indentation changes and some more COMPUTE_Z rules
123
133
 *
128
138
 * Revision 1.1  2004/03/19 09:48:45  ybychkov
129
139
 * "geomgraph" and "geomgraph/indexl" upgraded to JTS 1.4
130
140
 *
131
 
 * Revision 1.12  2003/11/07 01:23:42  pramsey
132
 
 * Add standard CVS headers licence notices and copyrights to all cpp and h
133
 
 * files.
134
 
 *
135
 
 *
136
141
 **********************************************************************/