Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for SetUnscaled (0.26 sec)

  1. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    			if c.RandBool() {
    				dec := &inf.Dec{}
    				q.d = infDecAmount{Dec: dec}
    				dec.SetScale(0)
    				dec.SetUnscaled(c.Int63())
    				return
    			}
    			// Be sure to test cases like 1Mi
    			dec := &inf.Dec{}
    			q.d = infDecAmount{Dec: dec}
    			dec.SetScale(0)
    			dec.SetUnscaled(c.Int63n(1024) << uint(10*c.Intn(5)))
    			return
    		}
    		if c.RandBool() {
    			q.Format = DecimalSI
    		} else {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/resource/amount.go

    		return result, true
    	}
    	return positiveScaleInt64(a.value, a.scale-scale)
    }
    
    // AsDec returns an inf.Dec representation of this value.
    func (a int64Amount) AsDec() *inf.Dec {
    	var base inf.Dec
    	base.SetUnscaled(a.value)
    	base.SetScale(inf.Scale(-a.scale))
    	return &base
    }
    
    // Cmp returns 0 if a and b are equal, 1 if a is greater than b, or -1 if a is less than b.
    func (a int64Amount) Cmp(b int64Amount) int {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 13 19:42:28 UTC 2023
    - 9.3K bytes
    - Viewed (0)
Back to top