Bounding_Box.cpp
Go to the documentation of this file.
00001 // Copyright (c) 2013 by Wayne C. Gramlich.  All rights reserved.
00002 
00003 #include "Bounding_Box.hpp"
00004 #include "Memory.hpp"
00005 #include <algorithm>
00006 
00007 BoundingBox::BoundingBox() {
00008   reset();
00009 }
00010 
00015 
00016 void BoundingBox::reset() {
00017     double big = 123456789.0;
00018     maximum_x = -big;
00019     minimum_x = big;
00020     maximum_y = -big;
00021     minimum_y = big;
00022 }
00023 
00031 
00032 void BoundingBox::update(double x, double y) {
00033     maximum_x = std::max(maximum_x, x);
00034     minimum_x = std::min(minimum_x, x);
00035     maximum_y = std::max(maximum_y, y);
00036     minimum_y = std::min(minimum_y, y);
00037 }
00038 


fiducial_lib
Author(s): Wayne Gramlich
autogenerated on Thu Jun 6 2019 18:08:04