comparison Framework/Toolbox/Extent2D.cpp @ 168:62964bfbbc00 wasm

Extent2D::Contains
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 02 Mar 2018 11:21:12 +0100
parents e2fe9352f240
children b70e9be013e4
comparison
equal deleted inserted replaced
167:0ee144f8f75a 168:62964bfbbc00
119 y1_ <= y2_); 119 y1_ <= y2_);
120 return (x2_ <= x1_ + 10 * std::numeric_limits<double>::epsilon() || 120 return (x2_ <= x1_ + 10 * std::numeric_limits<double>::epsilon() ||
121 y2_ <= y1_ + 10 * std::numeric_limits<double>::epsilon()); 121 y2_ <= y1_ + 10 * std::numeric_limits<double>::epsilon());
122 } 122 }
123 } 123 }
124
125
126 bool Extent2D::Contains(double x,
127 double y) const
128 {
129 if (empty_)
130 {
131 return false;
132 }
133 else
134 {
135 return (x >= x1_ && x <= x2_ &&
136 y >= y1_ && y <= y2_);
137 }
138 }
124 } 139 }