3 Sep
2009
3 Sep
'09
4:28 p.m.
On Thursday 03 September 2009 01:54:07 Michael Heuer wrote:
I'm curious, what would you want to extend a float[] for?
Very simple things like (algebraic) vectors, list of probabilities, etc. Of course I can always make classes that contain just a vector and duplicate every needed member functions and operators of float[], but that feels a bit silly . Moreover, unless there is some way of writing an implicit reference cast operator from foo to float[] (again, excuse this possibly trivial question, I am learning), I won't be able to use existing functions that take array references as parameters directly on foo (I will have to pass the member foo.content or trivially overload all of them). Yes I am lazy :)