HenryWilder / amitygxmod-calculator

A browser extension designed for Opera GX, made for helping with algebra
1 stars 0 forks source link

Normized vectors are not in simplest form #13

Open HenryWilder opened 11 months ago

HenryWilder commented 11 months ago

Ternary results are displaying normalized vectors not in their simplest-form.

Example: image

Current behavior

Vectors simplify per-element. $$\large \hat{\underline{v}} = (\frac{\underline{v}_x}{|\underline{v}|},\frac{\underline{v}_y}{|\underline{v}|},\frac{\underline{v}_z}{|\underline{v}|})$$

Example: $$\large \widehat{(3,4,5)} = (\frac{3}{\sqrt{50}},\frac{4}{\sqrt{50}},\frac{5}{\sqrt{50}}) = (\frac{3\sqrt{2}}{10},\frac{2\sqrt{2}}{5},\frac{\sqrt{2}}{2})$$

This is undesirable for readability and redundancy.

Expected behavior

Vectors should simplify as a complete whole. $$\large \underline{\hat{v}} = \underline{v}\frac{1}{|\underline{v}|}$$

Example: $$\large \widehat{(3,4,5)} = \frac{(3,4,5)}{\sqrt{50}} = \frac{(3,4,5)\sqrt{2}}{10}$$

HenryWilder commented 11 months ago

Potential problem:

What happens if all three parameters are the same number? Does it make sense to display something like this? $$\large \frac{(1,1,1)\sqrt{3}}{3}$$