Sha256: a0b8ced05aa2e44776ca0d9e84330d1a4c2ca9734ddc953326a7e75ba4c6f6eb
Contents?: true
Size: 606 Bytes
Versions: 2
Compression:
Stored size: 606 Bytes
Contents
require 'symath/value' require 'symath/definition/operator' module SyMath class Definition::Sharp < Definition::Operator def initialize() super(:sharp) end def description() return 'sharp(f) - musical raise/sharp/# isomorphic operator' end def evaluate_call(c) # Must normalize input, operation depends on factorized vectors return c.args[0].evaluate.normalize.sharp end def to_s(args = nil) if !args args = @args end return "\#(#{args[0]})" end def latex_format() return '%s^\sharp' end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
symath-0.1.1 | lib/symath/definition/sharp.rb |
symath-0.1.0 | lib/symath/definition/sharp.rb |