Rename Vector3.sub to Vector3.subtract
See original GitHub issueAll other methods other than sub
use full word (like add
, normalize
, random
, divide
, negate
, multiply
, distance
).
Issue Analytics
- State:
- Created a year ago
- Comments:18 (1 by maintainers)
Top Results From Across the Web
Vector3#sub – three.js docs
Projects this vector onto a plane by subtracting this vector projected onto the plane's normal from this vector. # .projectOnVector ( v :...
Read more >Scripting API: Vector3.operator - Unity - Manual
Subtracts one vector from another. Subtracts each component of b from a . // prints (-5.0,-3.0,-1.0) using UnityEngine; ...
Read more >Issues · mrdoob/three.js · GitHub
Rename Vector3.sub to Vector3.subtract Suggestion. #24612 opened Sep 8, 2022 by manake · 18. AnimationAction wrapping on time === duration Needs ...
Read more >Softimage User's Guide: Vector2 To Vector3 - Autodesk
Converts 2D vector input to 3D vector output. Name. The shader's name. Enter any name you like, or leave ...
Read more >Customising Operators in Python - acroz
class Vector3(object): """ Describes a 3-vector. ... so simply renaming the method to __add__ will make additions of Vector3 objects work as intended....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@manake Currently in Three.js, the “default” is
sub
, and it has less letters thansubtract
, hence the latter being more “verbose”.It isn’t an actual word in human English language, but that doesn’t matter much in computer languages, where the devs have the last say and they don’t have to necessarily conform to the constraints of the human language. Otherwise, Javascript would have replaced their similar
substr
withsubstring
,parseInt
withparseInteger
,min
withminimum
,max
withmaximum
and so on. Obviously, they didn’t, since they value background compatibility more, and it was the right call.I’m not against the suggestion itself. I’m against such suggestions after lots of people got used to them. I’m against such suggestions not being handled all at once and in a final manner. I’m against such suggestions taking a pass instead of more important ones related to functionality. That’s all.
sub is a valid acronym of subtract. I’ve seen
sub()
functions in other libraries as well so I think it should be clear for what it stands for.