MCPcopy Create free account
hub / github.com/cogentcore/core / BoolToFloat64

Function BoolToFloat64

tensor/bits.go:53–59  ·  view source on GitHub ↗
(bv bool)

Source from the content-addressed store, hash-verified

51}
52
53func BoolToFloat64(bv bool) float64 {
54 if bv {
55 return 1
56 } else {
57 return 0
58 }
59}
60
61func (tsr *Bits) IsString() bool {
62 return false

Callers 4

FloatMethod · 0.85
Float1DMethod · 0.85
FloatRowCellMethod · 0.85
FloatsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected