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

Method AddScalar

tensor/string.go:59–64  ·  view source on GitHub ↗
(i []int, val float64)

Source from the content-addressed store, hash-verified

57}
58
59func (tsr *String) AddScalar(i []int, val float64) float64 {
60 j := tsr.Shp.Offset(i)
61 fv := StringToFloat64(tsr.Values[j]) + val
62 tsr.Values[j] = Float64ToString(fv)
63 return fv
64}
65
66func (tsr *String) MulScalar(i []int, val float64) float64 {
67 j := tsr.Shp.Offset(i)

Callers 8

RenderMethod · 0.45
BaseSizeMethod · 0.45
SizeMethod · 0.45
renderLineNumberMethod · 0.45
cursorBBoxMethod · 0.45
LocalBBoxMethod · 0.45
LocalBBoxMethod · 0.45
LocalBBoxMethod · 0.45

Calls 3

StringToFloat64Function · 0.85
Float64ToStringFunction · 0.85
OffsetMethod · 0.80

Tested by

no test coverage detected