InEpsilon asserts that expected and actual have a relative error less than epsilon
(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{})
| 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 { |
| 745 | if h, ok := a.t.(tHelper); ok { |
| 746 | h.Helper() |
| 747 | } |
| 748 | return InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...) |
| 749 | } |
| 750 | |
| 751 | // InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. |
| 752 | func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { |