Thread: Vector
View Single Post
Old 11-24-2009, 09:23 PM   #37
peq's Avatar
Join Date: Jul 2006
Posts: 57

peq has little to show at this moment (4)


I have a request for an operation which I use quite often:
Collapse JASS:
        method addScaled takes vector addend, real scale returns nothing
            set this.x=this.x+addend.x*scale
            set this.y=this.y+addend.y*scale
            set this.z=this.z+addend.z*scale

Its nice to have a function like this if you use vectors for movement as you always need nomething like this:

Collapse JASS:
call position.addScaled(velocity, TimedLoop_PERIOD)

It would be nice if you could add this ;)
peq is offline   Reply With Quote