-
Notifications
You must be signed in to change notification settings - Fork 250
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
[Core] Refactor Dot
function in math_utils.h
to support template types
#13150
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Rubén Zorrilla <[email protected]>
Co-authored-by: Philipp Bucher <[email protected]>
Co-authored-by: Philipp Bucher <[email protected]>
) | ||
{ | ||
double temp = 0.0; | ||
TDataType temp {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a 0...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For fundamental types (like int
or double
), the variable is initialized to zero. For class types, the default constructor is called. A priori this will limited to float
and double
.
📝 Description
This change enhances the flexibility of the
Dot
function by making it compatible with various vector types beyond the defaultVector
type.After #13106
Commit Summary:
Dot
function in theMathUtils
class withinkratos/utilities/math_utils.h
to accept template parameters for the input vectors, allowing the function to handle different vector types (TVector1
andTVector2
).Vector
type.🆕 Changelog
Dot
product