dangmoody / HLML

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

Add negate operator #46

Closed dangmoody closed 3 years ago

dangmoody commented 3 years ago

E.G:

float3 x = float3( 1.0f, 1.0f, 1.0f );

float3 y = -x;

I thought I'd added this before but it looks like I haven't. This wants to get added sooner rather than later because this is used quite often!

In C this will want to be float3_negate( &x ) (using the example above).

dangmoody commented 3 years ago

Added in a few commits, won't tag them all. But it's done. It'll come out in the next release.