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

vec3.without(a, b) #4

Open
magcius opened this issue Jan 12, 2022 · 3 comments
Open

vec3.without(a, b) #4

magcius opened this issue Jan 12, 2022 · 3 comments

Comments

@magcius
Copy link

magcius commented Jan 12, 2022

Very common in games math, and a function that should probably be more well-known: without(a, b) is a - b*dot(a, b). You can think of it as projecting a onto the plane formed by the normal of b.

@greggman
Copy link
Owner

I don't mind adding new functions but I'm not seeing this as "very common" unless it goes by another name? It's doesn't appear to be in glm, nor Unreal, nor Unity. It doesn't appear to be in DirectX. Not sure where else to look. It does look liek their are lots of useful functions on some of those that I'd be happy to see added.

@magcius
Copy link
Author

magcius commented Jun 4, 2024

Unity calls it ProjectOnPlane

Unreal calls it ProjectOnTo, with a variant (ProjectOnToNormal) that assumes the given vector is normal.

@greggman
Copy link
Owner

greggman commented Jun 4, 2024

do you want to add it?

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