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

Added setLength() method to Vector2, Vector3 and Vector4 #66

Closed
wants to merge 1 commit into from
Closed

Added setLength() method to Vector2, Vector3 and Vector4 #66

wants to merge 1 commit into from

Conversation

ArgentiApparatus
Copy link
Contributor

Added a setLength() method to Vector2, Vector3 and Vector4, both 32 and 64 bit versions.

This can be viewed as a generalized version of normalize(), an I've tried to make the implementations very similar. the behavior when the existing length==0.0 is the same.

@ArgentiApparatus
Copy link
Contributor Author

A setter was what I originally planned but having looked at other methods (esp. normalize() that return [this] I decided that a function that also returned [this] was more inline with the current code style.

However, I've now (perhaps belatedly) read the comments on your current pull request,and seen that you are removing call chaining. If that is accepted I'd prefer to implement this as a setter.

@johnmccutchan
Copy link
Collaborator

I would prefer a setter because we will move away from returning 'this'

@Fox32
Copy link
Contributor

Fox32 commented Apr 13, 2015

This can be closed, the feature was implemented as a setter in #123

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

Successfully merging this pull request may close these issues.

None yet

3 participants