OK, a little bit more, the only change I had to do was change the first param from a reference to a value. (This allows GLB to parse more then one operator per vector calculation, more than one(result=one*two/three) would produce a running value, wich the next parsed operator would then use.)

So longer vector calculations are now possible(see "result = (((one + two) * two) * 10) / 4 + one", try this with the previous method to see the change)

Still messing around with this, next problem is overloading Gernots auto-generated operators as shown above >,<,=,==,!= etc.

`// --------------------------------- //`

// Project: veclibTest

// Start: Tuesday, July 31, 2012

// IDE Version: 11.001

INLINE

const TVec2 operator+(TVec2 _a, const TVec2& _b );

const TVec2 operator+(TVec2 _a, DGInt b);

const TVec2 operator*(TVec2 _a, const TVec2& _b );

const TVec2 operator*(TVec2 _a, DGInt b);

const TVec2 operator/(TVec2 _a, const TVec2& _b );

const TVec2 operator/(TVec2 _a, DGInt b);

ENDINLINE

TYPE TVec2

x#

y#

w# = 1

ENDTYPE

LOCAL one AS TVec2

LOCAL two AS TVec2

one.x = 1

one.y = 2

two.x = 3

two.y = 4

LOCAL result AS TVec2

result = (((one + two) * two) * 10) / 4 + one

STDOUT "result.x = " + result.x + "\n"

STDOUT "result.y = " + result.y + "\n"

STDOUT "result.w = " + result.w + "\n"

KEYWAIT

FUNCTION __dummy__:

ENDFUNCTION

INLINE

const TVec2 operator+(TVec2 _a, const TVec2& _b )

{

_a.x += _b.x;

_a.y += _b.y;

return _a;

}

const TVec2 operator+(TVec2 _a, DGInt b)

{

_a.x += b;

_a.y += b;

return _a;

}

const TVec2 operator*(TVec2 _a, const TVec2& _b )

{

_a.x *= _b.x;

_a.y *= _b.y;

return _a;

}

const TVec2 operator*(TVec2 _a, DGInt b)

{

_a.x *= b;

_a.y *= b;

return _a;

}

const TVec2 operator/(TVec2 _a, const TVec2& _b)

{

_a.x /= _b.x;

_a.y /= _b.y;

return _a;

}

const TVec2 operator/(TVec2 _a, DGInt b)

{

_a.x /= b;

_a.y /= b;

return _a;

}

ENDINLINE