MCPcopy Index your code
hub / github.com/expr-lang/expr / InDeltaf

Method InDeltaf

internal/testify/assert/assertion_forward.go:736–741  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

734//
735// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
736func (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
744func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool {

Callers

nothing calls this directly

Calls 2

InDeltafFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected