-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[math] implement genvector custom axis rotation #18462
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
Test Results 15 files 15 suites 3d 9h 2m 10s ⏱️ Results for commit 24cc921. ♻️ This comment has been updated with latest results. |
@@ -332,6 +338,38 @@ namespace ROOT { | |||
vrot.SetXYZ(x2, y2, v.Z()); | |||
return vrot; | |||
} | |||
|
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.
why not implementing an access operator in the Rotation3D class instead?
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.
see e.g. #18480
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.
Thanks Monica for the swift review.
Wrt using the Rotation3D class: It's maybe a bit less efficient to define an AxisAngle, then a TRotation3D, and finally calling Rotate, than doing the direct multiplication?
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.
You have a point. However, I agree with the author of the forum post you mentioned, it's counter-intuitive that a TRotation3D does not work with Rotate...
as suggested by mdessole
This Pull request:
Changes or fixes:
Fixes https://root-forum.cern.ch/t/tvector3-rotate-to-arbitrary-rotation-using-xyzvector/63244
Checklist: