MCPcopy Create free account
hub / github.com/google/gapid / Equals

Method Equals

core/assert/float.go:40–43  ·  view source on GitHub ↗

Equals asserts that the float equals v with ± tolerance.

(v, tolerance float64)

Source from the content-addressed store, hash-verified

38
39// Equals asserts that the float equals v with ± tolerance.
40func (o OnFloat) Equals(v, tolerance float64) bool {
41 min, max := v-tolerance, v+tolerance
42 return o.Compare(o.value, "in", min, "to", max).Test(o.value >= min && o.value <= max)
43}

Callers

nothing calls this directly

Calls 2

TestMethod · 0.80
CompareMethod · 0.45

Tested by

no test coverage detected