Module Import alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpAdd BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr Num body Return Call NameLoad Str Return BinOpDiv Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpDiv NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareGt Call AttributeLoad NameLoad attr Num body Return Call AttributeLoad NameLoad attr orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad UnaryOpUSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad NameLoad body Return BinOpAdd BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpMult AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Return Call NameLoad BinOpMult AttributeLoad NameLoad attr NameLoad BinOpMult AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad BinOpDiv AttributeLoad NameLoad attr NameLoad BinOpDiv AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot Call NameLoad NameLoad NameLoad body Return NameLoad Assign NameStore BinOpSub NameLoad NameLoad Return BoolOpAnd CompareLt Call NameLoad AttributeLoad NameLoad attr NameLoad CompareLt Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return UnaryOpNot Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareEq NameLoad Num body Return AttributeLoad NameLoad attr orelse If CompareEq NameLoad Num body Return AttributeLoad NameLoad attr orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq NameLoad Num body Assign AttributeStore NameLoad attr NameLoad orelse If CompareEq NameLoad Num body Assign AttributeStore NameLoad attr NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad decorator_list Assign NameStore Call NameLoad Num Num Assign NameStore Call NameLoad Num Num Assign NameStore Call NameLoad Num Num Assign NameStore Num
N/A N/A math collections defaultdict Vector N/A object N/A N/A Class for 2D Vectors.

	Vectors v have an x and y component that can be accessed multiple ways:

		- v.x, v.y
		- v[0], v[1]
		- x,y = v.as_tuple()

	 __init__ N/A N/A self x y N/A N/A N/A Create a new vector object.

		@type x: float
		@param x: The X component of the vector

		@type y: float
		@param y: The Y component of the vector
		 N/A N/A self x x N/A N/A self y y N/A get_length N/A N/A self N/A N/A N/A Get the length of the vector. N/A N/A N/A math sqrt N/A N/A self get_length_squared N/A get_length_squared N/A N/A self N/A N/A N/A Get the squared length of the vector, not calculating the square root for a performance gain N/A N/A N/A N/A self x N/A self x N/A N/A self y N/A self y N/A get_slope N/A N/A self N/A N/A N/A Get the slope of the vector, or float('inf') if x == 0 N/A N/A N/A self x 0 N/A N/A N/A float inf N/A N/A N/A float N/A self y N/A self x N/A normalize N/A N/A self N/A N/A N/A Return a normalized version of the vector that will always have a length of 1. N/A N/A self N/A N/A self get_length N/A clamp N/A N/A self N/A N/A N/A Return a vector that has the same direction than the current vector, but is never longer than 1. N/A N/A N/A N/A self get_length 1 N/A N/A N/A N/A self normalize N/A N/A self N/A clone N/A N/A self N/A N/A N/A Return a copy of this vector N/A N/A Vector N/A self x N/A self y N/A normal N/A N/A self N/A N/A N/A Return a normal vector of this vector N/A N/A Vector N/A N/A self y N/A self x N/A as_tuple N/A N/A self N/A N/A N/A Convert the vector to a non-object tuple N/A N/A N/A self x N/A self y N/A __add__ N/A N/A self b N/A N/A N/A N/A Vector N/A N/A self x N/A b x N/A N/A self y N/A b y N/A __sub__ N/A N/A self b N/A N/A N/A N/A Vector N/A N/A self x N/A b x N/A N/A self y N/A b y N/A __mul__ N/A N/A self val N/A N/A N/A N/A isinstance val Vector N/A N/A N/A N/A N/A self x N/A val x N/A N/A self y N/A val y N/A N/A N/A Vector N/A N/A self x val N/A N/A self y val N/A __div__ N/A N/A self val N/A N/A N/A N/A Vector N/A N/A self x val N/A N/A self y val N/A __repr__ N/A N/A self N/A N/A N/A N/A Vector(%.3f, %.3f) N/A N/A self x N/A self y N/A __eq__ N/A N/A self other N/A N/A N/A N/A N/A isinstance other Vector N/A N/A False N/A d N/A self other N/A N/A N/A N/A abs N/A d x EPSILON N/A N/A abs N/A d y EPSILON N/A __ne__ N/A N/A self other N/A N/A N/A N/A N/A N/A self __eq__ other N/A __hash__ N/A N/A self N/A N/A N/A N/A hash N/A %.4f %.4f N/A N/A self x N/A self y N/A __getitem__ N/A N/A self key N/A N/A N/A N/A key 0 N/A N/A N/A self x N/A N/A N/A key 1 N/A N/A N/A self y N/A N/A N/A KeyError N/A Invalid key: %s. Valid keys are 0 and 1 for x and y key N/A __setitem__ N/A N/A self key value N/A N/A N/A N/A key 0 N/A N/A N/A self x value N/A N/A N/A key 1 N/A N/A N/A self y value N/A N/A N/A KeyError N/A Invalid key: %s. Valid keys are 0 and 1 for x and y key N/A N/A length N/A property get_length None None N/A length_squared N/A property get_length_squared None None N/A slope N/A property get_slope None None N/A N/A VECTOR_NULL N/A Vector 0 0 N/A VECTOR_X N/A Vector 1 0 N/A VECTOR_Y N/A Vector 0 1 N/A EPSILON 0.0001