PointRotator.Rotate C# (CSharp) Method

Rotate() public method

public Rotate ( Vector3, point, Vector3, pivot, float duration, float angle ) : void
point Vector3,
pivot Vector3,
duration float
angle float
return void
    public void Rotate(Vector3 point, Vector3 pivot, float duration, float angle)
    {
        this.point = point;
        this.pivot = pivot;
        this.rate = angle/duration;
        this.angle = angle;
        rotating = true;
    }
    public void Update()

Usage Example

        public void RotationTest270Degree()
        {
            Point p = new Point(3, 2);

            PointRotator rotator = new PointRotator(270);

            var rotate = rotator.Rotate(p);

            Assert.AreEqual(rotate.X, 2);
            Assert.AreEqual(rotate.Y, -3);
        }
All Usage Examples Of PointRotator::Rotate
PointRotator