Bounding_Box.cpp
Go to the documentation of this file.
1 // Copyright (c) 2013 by Wayne C. Gramlich. All rights reserved.
2 
3 #include "Bounding_Box.hpp"
4 #include "Memory.hpp"
5 #include <algorithm>
6 
8  reset();
9 }
10 
15 
17  double big = 123456789.0;
18  maximum_x = -big;
19  minimum_x = big;
20  maximum_y = -big;
21  minimum_y = big;
22 }
23 
31 
32 void BoundingBox::update(double x, double y) {
33  maximum_x = std::max(maximum_x, x);
34  minimum_x = std::min(minimum_x, x);
35  maximum_y = std::max(maximum_y, y);
36  minimum_y = std::min(minimum_y, y);
37 }
38 
double minimum_y
void reset()
Resets the contents of bounding_box to empty.
double maximum_y
double maximum_x
Definition: Bounding_Box.hpp:9
double minimum_x
void update(double x, double y)
Adds the point (x, y) to *bounding_box.


fiducial_lib
Author(s): Wayne Gramlich
autogenerated on Thu Dec 28 2017 04:06:53