Skip to content

antingle/functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Functions

A calculator that lives in your macOS menu bar and keeps a history of your calculations

Calculator in the menu bar Calculator window Calculator in the menu bar Calculator window

Opening

  • The app is currently not signed, so simply double clicking the app will not open it
  • You must right click the app and choose 'Open'
  • You will then receieve a warning popup that the app cannot be checked for malicious software
  • You can then choose the button to 'Open' it

Usage

  • Calculator can be accessed by pressing the f(x) symbol in your menu bar
  • The calculator can also be toggled with the global shortcut option + command + c
    • This is not working yet, since there is no way to currently open a MenuBarExtra programmtically.
  • Calculations can be typed and submitted to history by pressing Enter
  • History is saved even when the app is quit. It can also be cleared.
  • Pprevious solutions or expressions can be added to the textfield by clicking on them
  • Previous solutions can also be added by cycling through them with arrow keys or the arrow buttons
  • Previous solutions can be copied to the clipboard by pressing the copy symbol to the right each submitted solution
  • Typing infix operators (excluding e and -) will insert the previous answer before them for continuous calculations
  • A live preview of the calculation is shown while typing an expression

Notes

  • Non-valid calculations cannot be submitted to history
  • Syntax must be valid (only numbers with supported operators, functions and constants)
  • Closing parentheses are added upon submission of an expression if open pairs are missing their closed counterparts

Currently supported math symbols:

constants

pi or π, e

infix operators

+ - / * % ^ e

prefix operators

-

functions

// Unary functions

sqrt(x)
floor(x)
ceil(x)
round(x)
cos(x)
acos(x)
sin(x)
asin(x)
tan(x)
atan(x)
abs(x)
ln(x)
log(x) or log10(x)
log2(x)

// Binary functions

pow(x,y)
atan2(x,y)
mod(x,y)

// Variadic functions

max(x,y,[...])
min(x,y,[...])

Credits