- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for scaledValue (0.15 sec)
-
staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go
func (q *Quantity) Value() int64 { return q.ScaledValue(0) } // MilliValue returns the value of ceil(q * 1000); this could overflow an int64; // if that's a concern, call Value() first to verify the number is small enough. func (q *Quantity) MilliValue() int64 { return q.ScaledValue(Milli) } // ScaledValue returns the value of ceil(q / 10^scale).
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 23.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go
t.Errorf("Expected %v, got %v; %#v", e, a, q) } q2, err := ParseQuantity(q.String()) if err != nil { t.Errorf("Round trip failed on %v", q) } if e, a := item.value, q2.ScaledValue(item.scale); e != a { t.Errorf("Expected %v, got %v", e, a) } q3 := NewQuantity(0, DecimalSI) q3.SetScaled(item.value, item.scale) if q.Cmp(*q3) != 0 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed May 29 21:48:10 UTC 2024 - 49.4K bytes - Viewed (0)