Beispiel #1
0
    //Manipulation with operators (/)
    public static IdleNumber operator /(IdleNumber n1, IdleNumber n2)
    {
        IdleNumber idleN = new IdleNumber(n1);

        idleN.Divide(n2.GetNumber());
        idleN.SetScale(idleN.GetScale() - n2.GetScale());

        return(idleN);
    }
Beispiel #2
0
    //Manipulation with operators (*)
    public static IdleNumber operator *(IdleNumber n1, IdleNumber n2)
    {
        IdleNumber idleN = new IdleNumber(n1);

        idleN.Multiply(n2.GetNumber());
        idleN.SetScale(idleN.GetScale() + n2.GetScale());

        return(idleN);
    }