-
Notifications
You must be signed in to change notification settings - Fork 808
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: Function GetOrthogonal
for easier othogonalization of a 2 ve…
#1619
Conversation
…ctors set Utilize: vector/angle unpack in `TypeToString`
This date commit also reduces 6 string concatenations and one table extraction. |
|
Garrysmod is not Matlab. Don't expect generic math function to be added to the library. They are just code bloat. |
I mean, not really. The GMod Lua library has tons of "generic math functions" Its a good change. Makes things easier, that is a fine update for me. |
generic was the wrong adjective. I meant very specific use case and won't be used often. |
To me atleast orthogonalizing vectors happens quite often and I have to code stuff like this. instead of just calling a function :) |
Some things I noticed that you should update: Such as Also, I don't necessarily believe that |
Yea, I figured that's what you meant. |
You still need to remove unrelated changes. This PR should only contain the GetOrthogonalVector addition, nothing else. |
Also, you need to fix the code styling to match the rest of the codebase. |
I'm not saying it's not useful. I'm saying its not useful enough to be a core function. If it is, then it still shouldn't be in the util lib. |
The |
I am still going to let |
Put it into a separate PR. Also, you still need to fix the style. |
@Kefta I am using Tabs. An I missing something else ? |
Look around the file. There should be spaces surrounding parentheses ( |
@Kefta Done, Found it. thank you! |
You still need spaces around control statements, and a space between
Notice the spaces surrounding the if-statement. |
You still need a space between |
@Kefta Done, thank you ! |
I wonder is there a way for this to utilize VectorVectors? |
Yes, I've requested it to be pushed. |
I see it includes the normalization of the right and up vectors when only forward |
The right and up vectors are the returns: they aren't provided to the function. |
But how does it |
0,0,1 is used as the absolute up vector. |
Is it good then for |
I think this is too niche to be included with the base game. Not every math function you use in your addon(s) needs including in the base game. |
Utilize:
vector
/angle
methodUnpack
inTypeToString
finction