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

Function InDeltaf

internal/testify/require/require.go:927–935  ·  view source on GitHub ↗

InDeltaf asserts that the two numerals are within delta of each other. assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted")

(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

925//
926// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
927func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
928 if h, ok := t.(tHelper); ok {
929 h.Helper()
930 }
931 if assert.InDeltaf(t, expected, actual, delta, msg, args...) {
932 return
933 }
934 t.FailNow()
935}
936
937// InEpsilon asserts that expected and actual have a relative error less than epsilon
938func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {

Callers 1

InDeltafMethod · 0.70

Calls 3

InDeltafFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…