Skip to content

A browser extension designed for Opera GX, made for helping with algebra

Notifications You must be signed in to change notification settings

HenryWilder/amitygxmod-calculator

Repository files navigation

Amity GX - Calculator

A browser extension designed for Opera GX, made for helping with algebra.

The extension currently has two sections:

  1. The notes section
  2. The calculator section

The notes section

image

The notes section is a textarea for users to type notes into. Its only notable qualities are:

  • Being vertically resizeable.
  • Horizontally scaling to fit the width of the entire panel.
  • Using a monospace font so that text can be aligned across multiple lines through the use of whitespace characters like space.

The calculator section

image

The calculator section is used for quickly performing all operations on a combination of numbers simultaneously, giving the user insights about how the numbers may relate to each other.

The calculator section is made up of three elements:

  1. Parameters
  2. Run calculations (ƒ) button
  3. Results section

Parameters

image

The parameters are a set of up to three numeric inputs. The number of parameters available is dependent on how many are filled in, or active. The number of active parameters also determines what operations are available in the Results section.

  1. Zero parameters:
    image

  2. One parameter (unary):
    image

  3. Two parameters (binary):
    image

  4. Three parameters (ternary):
    image

Entering a value into a parameter activates it, and makes the next parameter available. An available but inactive parameter has a grayed-out label and the ∅ (empty set) placeholder.
image image image

Run calculations (ƒ) button

image (enabled)
image (disabled)

When there is a change to the parameters, the ƒ button is enabled. Clicking it will refresh the results.

The ƒ button is only enabled when the current parameters are not identical to what they when used to calculate the currently-displayed results.

Calculations can also be run by pressing enter while focusing any of the parameters.

Results section

image image image

The results section shows the results of each operation for the parameters simultaneously.

Wherever a parameter appeares in the results section, it is colored to match that parameter's label. Results are shown in bold.
By default, the colors are as follow:

  • A: 🟥 Red
  • B: 🟦 Blue
  • C: 🟩 Green
  • [result]: 🟧 Orange

When a parameter changes, all instances of references to it in the results section are boxed in a gray, dashed outline to show what inputs of the calculation will be affected by the change. If it changes back to what it was when used to calculate the currently-displayed results, the outline disappears.

Unary results

image

Unary results disply all operations which can be performed on a single integer. Currently included are the following operations:

  • Quick Insights (name isn't final)

    • Whether the number is even or odd
    • Whether the number is prime or composite
  • Square $(A^{2})$

  • Square root $(\sqrt{A})$ — Simplifies radical to exact value

  • Factors

    factor $A$
    $1$ $\large\frac{A}{1} \therefore A$
    ... ...
    $n$ $\large\frac{A}{n}$

    $\forall n \in \{1,...,A\} : \frac{A}{n} \in \Bbb{Z}^+$

image

Binary results

image

Binary results disply all operations which can be performed on a pair of integers. Currently included are the following operations:

  • Comparison $(A \lt=\gt B)$ $((A\lt{B};A=B;A\gt{B}))$

  • Sum $(A+B)$

  • Difference $(A-B)$

  • Product $(AB)$

  • Quotient $(\frac{A}{B})$ — Simplifies fraction to exact value

  • Remainder $(A\bmod{B})$

  • Power $(A^{B})$

  • Log $(\log_{A}B)$

  • GCF (Greatest Common Factor)

  • LCM (Least Common Multiple)

  • Common factors

    factor $A$ $B$
    $1$ $\large\frac{A}{1} \therefore A$ $\large\frac{B}{1} \therefore B$
    ... ... ...
    $n$ $\large\frac{A}{n}$ $\large\frac{B}{n}$

    $\forall n \in \{1,...,\displaystyle\min_{\{A,B\}}\} : \{\frac{A}{n}, \frac{B}{n}\} \subset \Bbb{Z}^+$

image

Ternary results

image

Ternary results disply all operations which can be performed on a triplet of integers. Currently included are the following operations:

  • Quick Insights (name isn't final)

    • Whether the parameters are normalized or not
    • Whether the parameters compose a Pythagorean Triple $(A^{2}+B^{2}=C^{2})$ or not
  • Vector definition $(\underline{v}=(A,B,C))$

  • Vector length $(|\underline{v}|)$ $((\sqrt{A^{2}+B^{2}+C^{2}}))$

  • Vector normal $(\underline{\hat v})$ $((\frac{\underline{v}}{|\underline{v}|}))$ $(((\frac{(A,B,C)}{\sqrt{A^{2}+B^{2}+C^{2}}})))$

  • Sum $(A+B+C)$

  • Product $(ABC)$

  • GCF (Greatest Common Factor)

  • LCM (Least Common Multiple)

  • Quadratic formula $(\frac{-B\pm\sqrt{B^{2}-4AC}}{2A})$not yet implemented

  • Common factors

    factor $A$ $B$ $C$
    $1$ $\large\frac{A}{1} \therefore A$ $\large\frac{B}{1} \therefore B$ $\large\frac{C}{1} \therefore C$
    ... ... ... ...
    $n$ $\large\frac{A}{n}$ $\large\frac{B}{n}$ $\large\frac{C}{n}$

    $\forall n \in \{1,...,\displaystyle\min_{\{A,B,C\}}\} : \{\frac{A}{n}, \frac{B}{n}, \frac{C}{n}\} \subset \Bbb{Z}^+$

image