MCPcopy
hub / github.com/cortexlabs/cortex / DollarsMaxPrecision

Function DollarsMaxPrecision

pkg/lib/strings/stringify.go:150–152  ·  view source on GitHub ↗
(val float64)

Source from the content-addressed store, hash-verified

148}
149
150func DollarsMaxPrecision(val float64) string {
151 return "$" + Round(val, 100, 2)
152}
153
154// This is similar to json.Marshal, but handles non-string keys (which we support). It should be valid YAML since we use it in templates
155func strIndent(val interface{}, indent string, currentIndent string, newlineChar string, quoteStr string) string {

Callers

nothing calls this directly

Calls 1

RoundFunction · 0.85

Tested by

no test coverage detected