On Thu, 2007-03-01 at 10:10 +0100, IOhannes m zmoelnig wrote:
Roman Haefeli wrote:
hi all
during my trials with gem i made a little set of abstractions, that hopefully could be usefull when dealing with vectors. at least they have been for me.
the set contains:
[v_+] : adds two vectors [v_-] : subtracts a vector from another [v_scale] : scales a vector
funnily enough theses have been part of Gem for a long time. they have been made abstractions and moved to markEx (along with other objects that are not directly related to Gem)
[v_mag] : outputs the magnitude of a vector [v_normalize] : normalizes a vector (so that its magnitude becomes 1) [v_x] : computes the cross product of two vectors [v_rotate] : rotates a vector around another
let me know if you miss something or if you find it not useable at all.
why don't you just make them part of the frank's list-abstractions?
i don't think that these should get part of list-abs, though they share some functionality. the list-abs are so cool, because they work with any list with any length. the aim of the v_abs is really only dealing with vectors (list of 3 floatatoms) and they are a bit faster because of that. when passing 1000 vectors each gem render cycle, this could make a difference, i think.
roman
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de