InDeltaf asserts that the two numerals are within delta of each other. a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})
| 749 | // |
| 750 | // a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") |
| 751 | func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { |
| 752 | if h, ok := a.t.(tHelper); ok { |
| 753 | h.Helper() |
| 754 | } |
| 755 | InDeltaf(a.t, expected, actual, delta, msg, args...) |
| 756 | } |
| 757 | |
| 758 | // InEpsilon asserts that expected and actual have a relative error less than epsilon |
| 759 | func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { |