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{})
| 734 | // |
| 735 | // a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") |
| 736 | func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { |
| 737 | if h, ok := a.t.(tHelper); ok { |
| 738 | h.Helper() |
| 739 | } |
| 740 | return InDeltaf(a.t, expected, actual, delta, msg, args...) |
| 741 | } |
| 742 | |
| 743 | // InEpsilon asserts that expected and actual have a relative error less than epsilon |
| 744 | func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { |