示例#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);
    }
示例#2
0
    public IdleNumber(IdleNumber idleN)
    {
        this.number            = idleN.GetNumber();
        this.scale             = idleN.GetScale();
        this.displayResolution = idleN.GetDisplayResolution();
        this.dataResolution    = idleN.GetDataResolution();

        id = System.Guid.NewGuid().GetHashCode();
    }
示例#3
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);
    }