Icon design figma.
Calculator design figma.
Design authored by Vatani Design under CC BY 4.0 license.
Code of main logic in src/logic.
Calculator parse String
for numbers([-+])?\\d+(?:[,.]\\d+)?
), brackets([()]
) and operator tokens(based on operators of calculator).
Brackets add priority
to operators in this brackets.
During parsing can be added Mul
operators or set sign of numbers.
window.calc
is instance of Calculator
with default options.
window.Calculator
is Calculator
.
For test math logic, tests written in jest.
To start local app run:
yarn
yarn dev