Union returns a SizeEstimate that encompasses both input the SizeEstimate.
(size SizeEstimate)
| 149 | |
| 150 | // Union returns a SizeEstimate that encompasses both input the SizeEstimate. |
| 151 | func (se SizeEstimate) Union(size SizeEstimate) SizeEstimate { |
| 152 | result := se |
| 153 | if size.Min < result.Min { |
| 154 | result.Min = size.Min |
| 155 | } |
| 156 | if size.Max > result.Max { |
| 157 | result.Max = size.Max |
| 158 | } |
| 159 | return result |
| 160 | } |
| 161 | |
| 162 | // AsCost converts a size estimates to an equivalent cost estimate. |
| 163 | func (se SizeEstimate) AsCost() CostEstimate { |
no outgoing calls
no test coverage detected