YLScsDrawing.Geometry.Vector.Rotate C# (CSharp) Method

Rotate() public method

public Rotate ( int Degree ) : void
Degree int
return void
        public void Rotate(int Degree)
        {
            double radian = Degree * Math.PI / 180.0;
            double sin = Math.Sin(radian);
            double cos = Math.Cos(radian);
            double nx = _x * cos - _y * sin;
            double ny = _x * sin + _y * cos;
            _x = nx;
            _y = ny;
        }