Lines Matching defs:from
40 Coord nearest_time(Point const &p, D2<Bezier> const &input, Coord from, Coord to)
42 Interval domain(from, to);
46 THROW_RANGEERROR("[from,to] interval out of bounds");
49 if (input.isConstant(0)) return from;
98 * related to the interval [from, to], to the point "p".
106 double from, double to )
108 if ( from > to ) std::swap(from, to);
109 if ( from < 0 || to > 1 )
111 THROW_RANGEERROR("[from,to] interval out of bounds");
113 if (c.isConstant()) return from;
118 double closest = from;
119 double min_dist_sq = L2sq(c(from) - p);
137 * the curve "c", related to the interval [from, to], to the point "p".
145 double from, double to)
147 if (from > to) {
148 std::swap(from, to);
150 if (from < 0 || to > 1) {
151 THROW_RANGEERROR("[from,to] interval out of bounds");
156 result.push_back(from);
163 candidates.push_back(from);
194 double from, double to)
196 if (from > to) std::swap(from, to);
197 if (from < c.cuts[0] || to > c.cuts[c.size()]) {
198 THROW_RANGEERROR("[from,to] interval out of bounds");
201 unsigned si = c.segN(from);
205 nearest_time(p, c[si], c.segT(from, si), c.segT(to, si));
210 double nearest = nearest_time(p, c[si], c.segT(from, si));
244 double from, double to)
246 if (from > to) {
247 std::swap(from, to);
249 if (from < c.cuts[0] || to > c.cuts[c.size()]) {
250 THROW_RANGEERROR("[from,to] interval out of bounds");
253 unsigned si = c.segN(from);
258 all_nearest_times(p, c[si], c.segT(from, si), c.segT(to, si));
267 all_np.push_back( all_nearest_times(p, c[si], c.segT(from, si)) );