Skip to content

Instantly share code, notes, and snippets.

@mbolt35
Created November 1, 2012 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbolt35/3991258 to your computer and use it in GitHub Desktop.
Save mbolt35/3991258 to your computer and use it in GitHub Desktop.
public static function vectorToArray(vector:*):Array {
if (!isVector(vector)) {
throw new ArgumentError("Illegal argument, non-Vector for use with vectorToArray().");
}
var result:Array = [];
for (var i:int = 0; i < vector.length; ++i) {
result[i] = vector[i];
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment