Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for dif (0.01 sec)

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

    func scaledValue(unscaled *big.Int, scale, newScale int) int64 {
    	dif := scale - newScale
    	if dif == 0 {
    		return unscaled.Int64()
    	}
    
    	// Handle scale up
    	// This is an easy case, we do not need to care about rounding and overflow.
    	// If any intermediate operation causes overflow, the result will overflow.
    	if dif < 0 {
    		return unscaled.Int64() * int64(math.Pow10(-dif))
    	}
    
    	// Handle scale down
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jan 29 20:41:44 UTC 2017
    - 2.5K bytes
    - Viewed (0)
Back to top