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

Vec2 normalize() return value #69

Open
wemyss opened this issue Sep 19, 2018 · 0 comments
Open

Vec2 normalize() return value #69

wemyss opened this issue Sep 19, 2018 · 0 comments
Milestone

Comments

@wemyss
Copy link
Contributor

wemyss commented Sep 19, 2018

I was wondering whether normalize should return a reference to this rather than the old length so that it makes it possible to use it in function chaining. Or alternatively create a normal() that is a wrapper around normalize and just returns this.

See the example below:

const myVec = vec.clone()
    .sub(vec2)
    .normalize()
    .mul(0.5)
    // and so on

Really cool project by the way! My only complaint is the minimal documentation which makes it harder as I don't have an understanding of where everything is in the library yet.

@shakiba shakiba added this to the v2.0 milestone Aug 25, 2023
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

No branches or pull requests

2 participants