nortakales / vs-code-qalc

Interactive scratchpad calculator for VS Code
MIT License
70 stars 2 forks source link

[Feature] new globalFunctions settings #13

Closed danilort closed 1 year ago

danilort commented 2 years ago

Qalc 0.1.8

I suggest some add the settings qalc.globalFunctions, to define my functions, constants, units which can be used globally (in each QALC file).

Example

settings

"qalc.globalFunctions": [
    "circleArea(x) = x^2 * pi",
    "hypotenuse(x,y) = sqrt(x^2 + y^2)",
    "catus(x,y) = sqrt(x^2 - y^2)"
],

myfile.qalc

circleArea(10)
hypotenuse(3, 4)
catus(5, 3)

output

immagine