Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

as3 Vector with init values

I want to instantiate a Vector.<Number> with two values of 1.0

You might think I would do Vector.<Number>(1.0, 1.0); but that only traces 0

Is what I'm trying to do possible? If so, how? Or am I stapled to the routine of using .push ?

like image 974
Jacksonkr Avatar asked Jan 14 '12 19:01

Jacksonkr


1 Answers

This one is even shorter:

var vec:Vector.<Number> = new <Number>[1.0, 1.0];
like image 63
weltraumpirat Avatar answered Sep 20 '22 02:09

weltraumpirat