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

"ONE" constant for Vector3/Vector2 #22806

Closed
ghost opened this issue Oct 6, 2018 · 5 comments · Fixed by #22808
Closed

"ONE" constant for Vector3/Vector2 #22806

ghost opened this issue Oct 6, 2018 · 5 comments · Fixed by #22808

Comments

@ghost
Copy link

ghost commented Oct 6, 2018

The only Vector3 constant that's missing compared to Unity is Vector3.ONE, which is shorthand for Vector3(1, 1, 1). It's something I didn't push for before #14704 was merged since I thought that PR was on pretty thin ice at the time, but now that it's in it would be nice to have it added once and for all.

The same could also be done for Vector2 (Vector2.ONE as a shorthand for Vector2(1, 1))

@ghost ghost changed the title "ONE" constant for Vector3 "ONE" constant for Vector3/Vector2 Oct 6, 2018
@aaronfranke
Copy link
Member

Hmm...

@KellyThomas
Copy link
Contributor

How do people feel about NEGONE now?

@akien-mga
Copy link
Member

I don't see much use case for NEGONE (beyond the fact that it's a weird name that I wouldn't understand as Vector3(-1, -1, -1) instinctively), since you can simply use -Vector3.ONE.

@aaronfranke
Copy link
Member

It's fine if you want to remove it. It's not critical though I do find it useful sometimes.

@KellyThomas
Copy link
Contributor

OK, I won't add it to #22808 then.

@akien-mga akien-mga added this to the 3.1 milestone Oct 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants