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

Function calculateRatio

internal/difflib/difflib.go:40–45  ·  view source on GitHub ↗
(matches, length int)

Source from the content-addressed store, hash-verified

38}
39
40func calculateRatio(matches, length int) float64 {
41 if length > 0 {
42 return 2.0 * float64(matches) / float64(length)
43 }
44 return 1.0
45}
46
47type Match struct {
48 A int

Callers 3

RatioMethod · 0.85
QuickRatioMethod · 0.85
RealQuickRatioMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…