Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for RoundUp (0.07 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr.go

    func GetScaledValueFromIntOrPercent(intOrPercent *IntOrString, total int, roundUp bool) (int, error) {
    	if intOrPercent == nil {
    		return 0, errors.New("nil value for IntOrString")
    	}
    	value, isPercent, err := getIntOrPercentValueSafely(intOrPercent)
    	if err != nil {
    		return 0, fmt.Errorf("invalid value for IntOrString: %v", err)
    	}
    	if isPercent {
    		if roundUp {
    			value = int(math.Ceil(float64(value) * (float64(total)) / 100))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 7.8K bytes
    - Viewed (0)
Back to top