Skip to main content
Glama
emicklei

melrōse musical expression player

by emicklei
multiply.go644 B
package calc import ( "fmt" "github.com/emicklei/melrose/core" ) type Multiply struct { Left any Right any } func (m Multiply) Storex() string { return fmt.Sprintf("%s * %s", core.Storex(m.Left), core.Storex(m.Right)) } func (m Multiply) Value() any { isFloatOp := false if _, ok := m.Left.(float64); ok { isFloatOp = true } if _, ok := m.Right.(float64); ok { isFloatOp = true } if isFloatOp { l, _ := resolveFloatWithInt(m.Left) r, _ := resolveFloatWithInt(m.Right) return l * r } // integer op l, ok := resolveInt(m.Left) if !ok { l = 0 } r, ok := resolveInt(m.Right) if !ok { r = 0 } return l * r }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emicklei/melrose'

If you have feedback or need assistance with the MCP directory API, please join our Discord server