dangmoody / HLML

Auto-generated maths library for C and C++ based on HLSL/Cg
24 stars 1 forks source link

dot_lean()? #41

Closed dangmoody closed 3 years ago

dangmoody commented 3 years ago

A friend of mine using the library found that he wanted to do a dot product for 2 float4s but he only cared about dotting the X, Y, and Z components. He suggested a dot_lean() function which would do this.

Sounds like a good idea, but I'm wondering if stuff like this could be added per-application instead of just having in the library; would it add confusion? Would this be bloat?

dangmoody commented 3 years ago

The current idea for this is:

If this were to get added it would be: dot3 and dot4 implementations. Where dot3 returns the dot product of xyz and dot4 returns the dot product of xyzw.

However, I still think that, for now, this would be better off a per-application thing. If enough people come back to me and request this, I'll add it.

Closing for now.