Three.js: THREE.Math is now _Math, probably need a better name that doesn't conflict with built-in Math.

Created on 24 Jul 2016  路  6Comments  路  Source: mrdoob/three.js

Description of the problem

We should probably figure out a new name for this class as without the THREE namespace, it conflicts with the built in JavaScript Math class.

See here:

https://github.com/mrdoob/three.js/blob/dev/src/math/Math.js

Three.js version
  • [x] Dev
  • [ ] r79
  • [ ] ...

    Browser
  • [x] All of them

  • [ ] Chrome
  • [ ] Firefox
  • [ ] Internet Explorer

    OS
  • [x] All of them

  • [ ] Windows
  • [ ] Linux
  • [ ] Android
  • [ ] IOS
Suggestion

Most helpful comment

How about MathUtils? (I've used that name before in similar situations.)

All 6 comments

Probably not a great idea, but why not use the British 'Maths'?

Here are som synonyms of math from google:

  • arithmetic
  • calculus
  • ciphering
  • computation
  • figures
  • figuring
  • calculation
  • mathematics
  • number crunching
  • numbers
  • reckoning

Not very helpful though I guess...

Maybe we could have a few, more specific, classes and call them Math2D/Math3D etc.

How about MathUtils? (I've used that name before in similar situations.)

@fraguada Not just British, but correct as well: "Math(ematic)s." But a vote for MathUtils, nonetheless.

Usually i would call this MathUtils (i actually do call it MathUtils in my IDKwGL library).

Just bump into this right now. I wish we could go back in time...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sunag picture sunag  路  161Comments

qornflex picture qornflex  路  113Comments

DefinitelyMaybe picture DefinitelyMaybe  路  88Comments

goodsign picture goodsign  路  101Comments

kdilayer picture kdilayer  路  62Comments