Replies: 1 comment
-
I think the history of these methods may be lost as they started on a dev branch that has been merged and deleted. From memory though, they started out as It was a while ago that I was thinking about this, but I think I ultimately felt that I think it would make sense to align the |
Beta Was this translation helpful? Give feedback.
-
Hello! Today I'm starting a port of our game from using f32 coordinates to using f64 coordinates for everything in world space. We're switching a lot of
Vec3
values toDVec3
, andQuat
toDQuat
.As part of that work, I noticed that conversions in the vector types and the quaternion types have different naming conventions! I thought that was incongruous, so I wanted to open this thread to ask about that.
I like the naming convention in the
Quat
types. I thinkas_<numtype>
is more clear thanas_<vectortype>
in code that's converting both vectors and quaternions.One consideration is that there are many more numeric types supported for vectors, as well as the 16-byte aligned SIMD variants with the
A
suffix. Normalizing the naming scheme to matchQuat
would make those other conversions stand out.What are you thoughts on this? Do you think it would be valuable to change either of the naming conventions, i.e. adding
Quat::as_dquat
or addingVec3::as_f64
?Beta Was this translation helpful? Give feedback.
All reactions