InDelta asserts that the two numerals are within delta of each other. a.InDelta(math.Pi, 22/7.0, 0.01)
(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{})
| 692 | // |
| 693 | // a.InDelta(math.Pi, 22/7.0, 0.01) |
| 694 | func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { |
| 695 | if h, ok := a.t.(tHelper); ok { |
| 696 | h.Helper() |
| 697 | } |
| 698 | return InDelta(a.t, expected, actual, delta, msgAndArgs...) |
| 699 | } |
| 700 | |
| 701 | // InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. |
| 702 | func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { |