code: func (q *Quantity) ScaledValue(scale Scale) int64 {
  	if q.Amount == nil {
  		return 0
  	}
  	return scaledValue(q.Amount.UnscaledBig(), int(q.Amount.Scale()), int(scale.infScale()))
  }
docs: // ScaledValue returns the value of ceil(q * 10^scale); this could overflow an int64.
  // To detect overflow, call Value() first and verify the expected magnitude.