#include <fstream>
#include <cfloat>
#include <unistd.h>
#include <fstream>
#include <cfloat>
#include <unistd.h>
int
curvetest (string filename)
{
int
curvetest (string filename)
{
+ // needed to initialize ID objects/counter used
+ // by Curve et al.
+ PBD::ID::init ();
+
ifstream in (filename.c_str());
stringstream line;
Curve c (-1.0, +1.0, 0, true);
double minx = DBL_MAX;
double maxx = DBL_MIN;
ifstream in (filename.c_str());
stringstream line;
Curve c (-1.0, +1.0, 0, true);
double minx = DBL_MAX;
double maxx = DBL_MIN;
- // needed to initialize ID objects/counter used
- // by Curve et al.
-
- PBD::ID::init ();
-
while (in) {
double x, y;
while (in) {
double x, y;
c.get_vector (minx, maxx, foo, 1024);
for (int i = 0; i < 1024; ++i) {
c.get_vector (minx, maxx, foo, 1024);
for (int i = 0; i < 1024; ++i) {
- cout << minx + (((double) i / 1024.0) * (maxx - minx)) << ' ' << foo[i] << endl;
+ cout << setw(20) << setprecision(20) << minx + (((double) i / 1024.0) * (maxx - minx)) << ' ' << foo[i] << endl;