Rotate the segment around a given pivot point.
The default pivot point of the segment is its first point.

@param rotation the rotation.
@param pivot1 the pivot point. If <code>null</code> the default pivot point is used.
486361
public void rotate(Quaternion rotation, Point3D pivot1) {
		if (pivot1==null) {
			rotate(rotation);
		} else {
			assert(pivot1!=null);

			Transform3D tr = new Transform3D();
			tr.setRotation(rotation);
			Vector3f v = new Vector3f();

			v.sub(this.getP1(), pivot1);
			tr.transform(v);
			this.getP1().add(pivot1, v);

			v.sub(this.getP2(), pivot1);
			tr.transform(v);
			this.getP2().add(pivot1, v);

			v.sub(this.getP3(), pivot1);
			tr.transform(v);
			this.getP3().add(pivot1, v);

			clearBufferedData();
		}
	}
1253873
def rotate(curve, degs, origin=None):
    
    def transform(z):
        return exp(1j*radians(degs))*(z - origin) + origin

    if origin is None:
        if isinstance(curve, Arc):
            origin = curve.center
        else:
            origin = curve.point(0.5)

    if isinstance(curve, Path):
        return Path(*[rotate(seg, degs, origin=origin) for seg in curve])
    elif is_bezier_segment(curve):
        return bpoints2bezier([transform(bpt) for bpt in curve.bpoints()])
    elif isinstance(curve, Arc):
        new_start = transform(curve.start)
        new_end = transform(curve.end)
        new_rotation = curve.rotation + degs
        return Arc(new_start, radius=curve.radius, rotation=new_rotation,
                   large_arc=curve.large_arc, sweep=curve.sweep, end=new_end)
    else:
        raise TypeError("Input `curve` should be a Path, Line, "
                        "QuadraticBezier, CubicBezier, or Arc object.")
1240826
public void rotate(Quaternion rotation) {
		Transform3D m = new Transform3D();
		m.setRotation(rotation);
		m.transform(this.getSegmentVector());
		this.getSegmentVector().normalize();
	}
915627
@Override
	public void set(Point3D center, double radius1) {
		this.cxProperty.set(center.getX());
		this.cyProperty.set(center.getY());
		this.czProperty.set(center.getZ());
		this.radiusProperty.set(Math.abs(radius1));
	}
1284591
private static long mixK1(long k1) {
    k1 *= C1;
    k1 = Long.rotateLeft(k1, 31);
    k1 *= C2;
    return k1;
  }
291456
public void rotate(Quaternion rotation) {
		Transform3D m = new Transform3D();
		m.transform(this.getFirstAxis());
		m.transform(this.getSecondAxis());
		m.transform(this.getThirdAxis());
		this.setFirstAxisExtent(this.getFirstAxis().length());
		this.setSecondAxisExtent(this.getSecondAxis().length());
		this.setThirdAxisExtent(this.getThirdAxis().length());
		this.getFirstAxis().normalize();
		this.getSecondAxis().normalize();
		this.getThirdAxis().normalize();
	}
1074502
public void rotate(double angle, double vx, double vy, double vz) {
		gl.glRotated(angle, vx, vy, vz);
	}
1180201
private void rotateLeft(int n) {
        final int r = right(n);
        final int lr = left(r);
        right(n, lr);
        if (lr != NIL) {
            parent(lr, n);
        }
        final int p = parent(n);
        parent(r, p);
        if (p == NIL) {
            root = r;
        } else if (left(p) == n) {
            left(p, r);
        } else {
            assert right(p) == n;
            right(p, r);
        }
        left(r, n);
        parent(n, r);
        fixAggregates(n);
        fixAggregates(parent(n));
    }
158819
public void setValue(Quaternionf rot) {
        mX = rot.x;
        mY = rot.y;
        mZ = rot.z;
        mW = rot.w;
    }
927251
private static void rotate(final Vector v, final int a, final int b, final int shift) {
		final int size = b - a;
		final int r = size - shift;
		final int g = gcd(size, r);
		for (int i = 0; i < g; i++) {
			int to = i;
			final Object tmp = v.elementAt(a + to);
			for (int from = (to + r) % size; from != i; from = (to + r) % size) {
				v.setElementAt(v.elementAt(a + from), a + to);
				to = from;
			}
			v.setElementAt(tmp, a + to);
		}
	}
572304
def rotate(self, theta_deg, xoff=0, yoff=0):
        
        self.rotate_deg([theta_deg], (xoff, yoff))
752976
public void setCurve (XY p1, XY cp1, XY cp2, XY p2) {
        setCurve(p1.x(), p1.y(), cp1.x(), cp1.y(),
                 cp2.x(), cp2.y(), p2.x(), p2.y());
    }
228513
public Matrix3 setToTransform (IVector translation, double rotation, double scale) {
        return setToRotation(rotation).set(m00 * scale, m10 * scale, translation.x(),
                                           m01 * scale, m11 * scale, translation.y(),
                                           0f, 0f, 1f);
    }
128780
private static Region rotateWithRightChild(Region k1) {
    Region k2 = k1.right;
    k1.right(k2.left);
    k2.left(k1);
    return k2;
  }
295930
public static BigDecimal movePoint(final BigDecimal v1, final int shift) {
        return v1 == null ? null : v1.movePointRight(shift);
    }
1321466
public void setCurve (XY p1, XY cp, XY p2) {
        setCurve(p1.x(), p1.y(), cp.x(), cp.y(), p2.x(), p2.y());
    }
1010784
public static Point spin(Point point, double angle) {
        return spin(Collections.singletonList(point), angle).get(0);
    }