// Rotate produces a clockwise rotation transform of angle, in radians.
514702
func (a Affine) Rotate(angle float64) Affine {
	s, c := math.Sincos(angle)
	return a.Mul(Affine{
		+c, +s, +0,
		-s, +c, +0,
		+0, +0, +1,
	})
}
846505
func RotateRight16(x uint16, k int) uint16 {
	if k < 0 {
		panic("negative rotation count")
	}
	const n = 16
	s := uint(k) & (n - 1)
	return x<<(n-s) | x>>s
}
210834
func Rotate3DZ(angle float32) Mat3 {
	//angle = (angle * math.Pi) / 180.0
	sin, cos := float32(math.Sin(float64(angle))), float32(math.Cos(float64(angle)))

	return Mat3{cos, sin, 0, -sin, cos, 0, 0, 0, 1}
}
543161
func (vec *T) Rotated(angle float64) T {
	sinus := math.Sin(angle)
	cosinus := math.Cos(angle)
	return T{
		vec[0]*cosinus - vec[1]*sinus,
		vec[0]*sinus + vec[1]*cosinus,
	}
}
1293502
func (v Vector) Angle(ov Vector) s1.Angle {
	return s1.Angle(math.Atan2(v.Cross(ov).Norm(), v.Dot(ov))) * s1.Radian
}
83060
func RotateRight32(x uint32, k int) uint32 {
	if k < 0 {
		panic("negative rotation count")
	}
	const n = 32
	s := uint(k) & (n - 1)
	return x<<(n-s) | x>>s
}
1356295
func (m *Matrix) RotateRad(rad float32) *Matrix {
	if rad == 0 {
		return m
	}
	sin, cos := math.Sincos(rad)
	m.tmp[m00] = cos
	m.tmp[m10] = sin
	m.tmp[m20] = 0

	m.tmp[m01] = -sin
	m.tmp[m11] = cos
	m.tmp[m21] = 0

	m.tmp[m02] = 0
	m.tmp[m12] = 0
	m.tmp[m22] = 1
	multiplyMatricies(m.Val[:], m.tmp[:])
	return m
}
1324883
func (quat *T) RotateVec3(v *vec3.T) {
	qv := T{v[0], v[1], v[2], 0}
	inv := quat.Inverted()
	q := Mul3(quat, &qv, &inv)
	v[0] = q[0]
	v[1] = q[1]
	v[2] = q[2]
}
1213175
func (p *PointType) Transform(x, y float64) PointType {
	return PointType{p.X + x, p.Y + y}
}
1036434
func (r Ring) Orientation() Orientation {
	area := 0.0

	// This is a fast planar area computation, which is okay for this use.
	// implicitly move everything to near the origin to help with roundoff
	offsetX := r[0][0]
	offsetY := r[0][1]
	for i := 1; i < len(r)-1; i++ {
		area += (r[i][0]-offsetX)*(r[i+1][1]-offsetY) -
			(r[i+1][0]-offsetX)*(r[i][1]-offsetY)
	}

	if area > 0 {
		return CCW
	}

	if area < 0 {
		return CW
	}

	// degenerate case, no area
	return 0
}
1355021
func (gc *StackGraphicContext) Rotate(angle float64) {
	gc.current.Tr.Rotate(angle)
}
972905
func rotate(points []float64, x, y float64, angle int) {
	if angle < 0 || angle > 3 {
		panic("rotate:参数angle必须0,1,2,3三值之一")
	}

	for i := 0; i < len(points); i += 2 {
		px := points[i] - x
		py := points[i+1] - y
		points[i] = px*cos[angle] - py*sin[angle] + x
		points[i+1] = px*sin[angle] + py*cos[angle] + y
	}
}
457215
func SetRotateLines(rotateLines int) {
	singltonLock.RLock()
	defer singltonLock.RUnlock()

	blog.SetRotateLines(rotateLines)
}
1058789
func (bc BoxCorners) Rotate(thetaDegrees float64) BoxCorners {
	cx, cy := bc.Center()

	thetaRadians := util.Math.DegreesToRadians(thetaDegrees)

	tlx, tly := util.Math.RotateCoordinate(cx, cy, bc.TopLeft.X, bc.TopLeft.Y, thetaRadians)
	trx, try := util.Math.RotateCoordinate(cx, cy, bc.TopRight.X, bc.TopRight.Y, thetaRadians)
	brx, bry := util.Math.RotateCoordinate(cx, cy, bc.BottomRight.X, bc.BottomRight.Y, thetaRadians)
	blx, bly := util.Math.RotateCoordinate(cx, cy, bc.BottomLeft.X, bc.BottomLeft.Y, thetaRadians)

	return BoxCorners{
		TopLeft:     Point{tlx, tly},
		TopRight:    Point{trx, try},
		BottomRight: Point{brx, bry},
		BottomLeft:  Point{blx, bly},
	}
}
597161
public void rotate(double angle_in_Radians) {
		Transformation2D temp = new Transformation2D();
		temp.setRotate(angle_in_Radians);
		multiply(temp);
	}
891631
func (l *LogFile) rotateRoutine() {
	go func() {
		for {
			if stats, err := os.Stat(l.Path()); err == nil {
				if stats.Size() >= l.size {
					l.Rotate()
				}
			}
			time.Sleep(l.rate)
		}
	}()
}
626829
func (vec *T) Rotate(angle float64) *T {
	*vec = vec.Rotated(angle)
	return vec
}