EpForceDirectedGraph.cs.FDGVector2.Divide C# (CSharp) Method

Divide() public method

public Divide ( float n ) : AbstractVector
n float
return AbstractVector
        public override AbstractVector Divide(float n)
        {
            if (n==0.0f)
            {
                x=0.0f;
                y=0.0f;
            }
            else
            {
                x=x/n;
                y=y/n;
            }
            return this;
        }

Usage Example

        public static FDGVector2 operator /(float a, FDGVector2 b)
        {
            FDGVector2 temp = new FDGVector2(b.x, b.y);

            temp.Divide(a);
            return(temp);
        }
All Usage Examples Of EpForceDirectedGraph.cs.FDGVector2::Divide