Using Self as a Method Default

BlitzMax Forums/BlitzMax Programming/Using Self as a Method Default

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

If your 2nd method there's no reason to have return self in your method. I guess if you're passing it on to something else you could just use the method on the vector you want to pass it to
hahah

We actualy had quite a long thread about this. And the conclution was 1) The speed difference was very small. 2)It was faster to return self but not allocate it, than not to return anything.

If you had an IF statement you could use 1 function and write it either way.
Well yes ;) that has been the point of my posts.
My general rule is, if its not in the game loop make the methods as general as possible, if it is in the game loop make them as specific as possible.

And yes,
V1.SM_add(V2)
V3=V1.Rm_add(v2)