Lines Matching defs:r1
137 bool are_same(Ray const& r1, Ray const& r2, double eps = EPSILON) {
138 return are_near(r1.vector(), r2.vector(), eps)
139 && are_near(r1.origin(), r2.origin(), eps);
142 // evaluate the angle between r1 and r2 rotating r1 in cw or ccw direction on r2
145 double angle_between(Ray const& r1, Ray const& r2, bool cw = true) {
146 double angle = angle_between(r1.vector(), r2.vector());
155 * @a r1 is rotated half the way to @a r2 in either clockwise or counter-clockwise direction.
161 * - If @a cw is set to @c true, the returned ray will equal the passed rays @a r1 and @a r2.
167 Ray make_angle_bisector_ray(Ray const& r1, Ray const& r2, bool cw = true)
169 if ( !are_near(r1.origin(), r2.origin()) )
174 Ray bisector(r1.origin(), r1.origin() + r1.vector() * Rotate(angle_between(r1, r2) / 2.0));