Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Constants to be added #14

Open
Crissov opened this issue May 11, 2019 · 1 comment
Open

[Suggestion] Constants to be added #14

Crissov opened this issue May 11, 2019 · 1 comment
Labels

Comments

@Crissov
Copy link

Crissov commented May 11, 2019

Radical Constants 👍

In addition to Math.TAU = 2·π = τ #5, at least some of these would make sense to have as well

  • (Number.EPSILON = ε already exists)
Constant Calculation Definition Symbol Approximate value Name
👍 Math.PHI (Math.SQRT5 + 1) / 2 ½+√1¼ φ 1.6180339887498948 Golden Number or Golden Ratio
👎 Math.PHIM1 1/Math.PHI = Math.PHI-1 Φ 0.6180339887498948
👍 Math.SQRT2P1 Math.SQRT2 + 1 δs 2.4142135623730950 Silver Ratio
👎 Math.THETA Math.sqrt(Math.PI) * Math.PHI φ·√π θ 2.8678905742557635
👎 Math.RHO (Math.cbrt(0.5+Math.sqrt(69)) + Math.cbrt(0.5-Math.sqrt(69)))/18 ³√(½ + √69)/18 + ³√(½ − √69)/18 ρ 1.324717… Plastic Ratio or Platin Number
👍 Math.SQRT3 Math.sqrt(3) √3 1.732050807568877 Theodorus constant
👍 Math.SQRT5 Math.sqrt(5) √5 2.2360679774997897
👍 Math.SQRT3_2 Math.sqrt(1.5) √1½ 1.2247448713915890
👍 Math.SQRT2_3 Math.sqrt(2/3) √⅔ 0.8164965809277260

Standard angles in radians 👎

Twelfths 👎

Constant Calculation Degrees Approximate radians
Math.CLOCK1 = Math.DEG30 Math.PI / 6 30° 0.524
Math.CLOCK2 = Math.DEG60 Math.PI / 3 60° 1.047
Math.CLOCK3 = Math.DEG90 Math.PI / 2 90° 1.571
Math.CLOCK4 = Math.DEG120 Math.PI * 2/3 120° 2.094
Math.CLOCK5 = Math.DEG150 Math.PI * 5/6 150° 2.618
Math.CLOCK6 = Math.DEG180 Math.PI 180° 3.142
Math.CLOCK7 = Math.DEG210 Math.PI * 7/6 210° 3.665
Math.CLOCK8 = Math.DEG240 Math.PI * 4/3 240° 4.189
Math.CLOCK9 = Math.DEG270 Math.PI * 3/2 270° 4.712
Math.CLOCK10 = Math.DEG300 Math.PI * 5/3 300° 5.236
Math.CLOCK11 = Math.DEG360 Math.PI * 11/6 330° 5.760
Math.CLOCK12 = Math.DEG360 Math.PI * 2 = Math.TAU 360° 6.283

Fourths, Eighths or Sixteenths 👎

Constant Calculation Degrees Approximate radians Compass
Math.NORTH = Math.DEG360 0 0 North
Math.NNE Math.PI / 8 22½° 0.393 North-Northeast
Math.NE = Math.DEG45 Math.PI / 4 45° 0.785 Northeast
Math.ENE Math.PI * 3/8 67½° 1.178 East-Northeast
Math.EAST = Math.DEG90 Math.PI / 2 90° 1.571 East
Math.ESE Math.PI * 5/8 112½° 1.963 East-Southeast
Math.SE = Math.DEG135 Math.PI * 3/4 135° 2.356 Southeast
Math.SSE Math.PI * 7/8 157½° 2.749 South-Southeast
Math.SOUTH = Math.DEG180 Math.PI 180° 3.142 South
Math.SSW Math.PI * 9/8 202½° 3.534 South-Southwest
Math.SW = Math.DEG225 Math.PI * 5/4 225° 3.927 Southwest
Math.WSW Math.PI * 11/8 247½° 4.320 West-Southwest
Math.WEST = Math.DEG270 Math.PI * 3/2 270° 4.712 West
Math.WNW Math.PI * 13/8 292½° 5.105 West-Northwest
Math.NW = Math.DEG315 Math.PI * 7/4 315° 5.498 Northwest
Math.NNW Math.PI * 15/8 337½° 5.890 North-Northwest
Crissov added a commit to Crissov/proposal-math-extensions that referenced this issue Feb 10, 2020
implements rwaldron#5 τ
implements rwaldron#14 φ etc.
@rwaldron
Copy link
Owner

I just left a comment on the PR. Let's drop the Twelfths, Fourths, Eighths or Sixteenths (with the exception of TAU)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants