AS3载体的初始化值初始化、载体

2023-09-08 13:32:49 作者:开到荼靡

我要的实例化的一个矢量<数量> 1.0

您可能认为我会做矢量<数量>(1.0,1.0); 但是,只有痕迹 0

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

就是我试图做可能吗?如果是这样,怎么样?还是我钉使用的常规 .push

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

推荐答案

这一个是更短的:

var vec:Vector.<Number> = new <Number>[1.0, 1.0];