Facepunch / garrysmod-requests

Feature requests for Garry's Mod
86 stars 24 forks source link

Add additional engine vector/angle/matrix methods #1442

Open Kefta opened 5 years ago

Kefta commented 5 years ago

Vector:

Angle:

I think Angle:Negate exists but it's a useless operation if all it does is negate each component.

Matrix:

There are a bunch of more VMatrix operations that would be useful for more efficient transformation Lua code but I think these are suitable for the meantime.

Let me know if you want use cases or benchmarks compared to Lua alternatives for any of these.

dvdvideo1234 commented 5 years ago

I will instantly reduce the code in my addons Thank you !

dvdvideo1234 commented 5 years ago

I will be then able to remove this section of the assembly library!

thegrb93 commented 5 years ago

That is one dense library. Holy fuck

thegrb93 commented 5 years ago

The scooby doo references are funny ;v

dvdvideo1234 commented 5 years ago

@thegrb93 I see you are man of culture as well ;)

EntranceJew commented 1 year ago

I just happened across the lack of Angle:IsEqualTol or a way of handling epsilon across vector-like functions with a math.IsClose like #1991 suggests.

Issues with Angle could be mitigated if Angle:Vector() existed to compliment Vector:Angle(), although that might not be the most optimal path compared to having parity.