Home | History | Annotate | Download | only in hwc

Lines Matching full:rational

202 class Rational {
204 Rational(void) : _n(0), _d(1) {}
205 Rational(uint32_t n, uint32_t d) : _n(n), _d(d) {}
210 bool operator==(const Rational& other) const;
211 bool operator!=(const Rational& other) const { return !(*this == other); }
212 bool operator<(const Rational& other) const;
213 bool operator>(const Rational& other) const {
217 Rational& lower, Rational& upper);
261 Rational hScale;
264 Rational vScale;
291 Rational scHScale(uint32_t format,
295 Rational scVScale(uint32_t format,
533 >= Rational(searchLimits.sourceCrop.width(),
548 >= Rational(searchLimits.sourceCrop.height(),
1084 // binary search of rational numbers. The numerator in each of the
1085 // rational numbers contains the dimension for the source crop, while
1090 // named double2Rational, which determines the closest rational numbers
1091 // just below and above the mid-point. By default the lower rational
1096 Rational scHScale(uint32_t format,
1102 Rational best(0, 1), minBad; // Current bounds for a binary search
1119 Rational lower, upper, selected;
1122 // TODO: Avoid rounding issue by using Rational type for
1127 Rational::double2Rational(mid,
1152 num, (float) Rational(scDim.width(), dfDim.width()),
1164 if (firstPass) { return Rational(scDim.width(), dfDim.width()); }
1167 best = Rational(scDim.width(), dfDim.width());
1171 minBad = Rational(scDim.width(), dfDim.width());
1183 // binary search of rational numbers. The numerator in each of the
1184 // rational numbers contains the dimension for the source crop, while
1189 // named double2Rational, which determines the closest rational numbers
1190 // just below and above the mid-point. By default the lower rational
1195 Rational scVScale(uint32_t format,
1201 Rational best(0, 1), minBad; // Current bounds for a binary search
1218 Rational lower, upper, selected;
1221 // TODO: Avoid rounding issue by using Rational type for
1226 Rational::double2Rational(mid,
1251 num, (float) Rational(scDim.height(), dfDim.height()),
1263 if (firstPass) { return Rational(scDim.height(), dfDim.height()); }
1266 best = Rational(scDim.height(), dfDim.height());
1270 minBad = Rational(scDim.height(), dfDim.height());
1336 // Rational member functions
1337 bool Rational::operator==(const Rational& other) const
1345 bool Rational::operator<(const Rational& other) const
1353 Rational::operator string() const
1362 void Rational::double2Rational(double f, Range nRange, Range dRange,
1363 Rational& lower, Rational& upper)
1365 Rational bestLower(nRange.lower(), dRange.upper());
1366 Rational bestUpper(nRange.upper(), dRange.lower());
1370 Rational val(d * f, d); // Lower, because double to int cast truncates