-
Notifications
You must be signed in to change notification settings - Fork 189
How about let xy()
and xyz()
functions return references instead of values.
#11
Comments
Hi, FrankStain! |
@VladSerhiienko , hey :) It was long time away, so yep, i tried to make some tests around this issue. So, just requesting the Did i missed something more important? By means accessing of |
Hi, regarding returning references rather than values for subcomponents, Then take a look at the simd4f data type on each platform here: It's pretty different, in some cases (e.g NEON) this uses a type like In general, I really don't recommend using reinterpret_cast with mathfu Cheers, On Fri, May 20, 2016 at 5:23 AM, Franken notifications@github.com wrote:
|
@stewartmiles , hi! Sadly, i can't clearly understand some of your words. Did you mean that
Can you clarify this point widely? |
That's correct, float32x4_t can't safely be reintepreted as float32x2_t. The compiler intrinsics for NEON's simd2f are located in On Fri, May 20, 2016 at 9:26 AM, Franken notifications@github.com wrote:
|
I had noticed that
mathfu::Vector<T, 3>
has homogeneous memory representation withmathfu::Vector<T, 3>
.It means that
mathfu::vec3
can be safely casted tomathfu::vec2
viareinterpret_cast<mathfu::vec2&>( vec3_inst )
.And same situation i see for
mathfu::vec4
andmathfu::vec3
classes.So how about making
mathfu::vec3::xy()
,mathfu::vec4::xy()
andmathfu::vec4::xyz()
return references instead of values?Smth like:
Such conversion is much helpful!
The text was updated successfully, but these errors were encountered: