Created
November 1, 2012 02:28
-
-
Save mbolt35/3991256 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This constant is set to the fully qualified class name for Vector | |
private static const VECTOR_CLASS:String = "__AS3__.vec::Vector"; | |
// Use flash.utils.describeType() on the input, and verify type | |
// of the object is a Vector class. This is probably fairly | |
// expensive, a valid point to my argument. | |
public static function isVector(vector:*):Boolean { | |
var type:String = flash.utils.describeType(vector).@name; | |
return type.indexOf(VECTOR_CLASS) != -1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment