Table Of Contents

Previous topic

vec2d

Next topic

viewer

This Page

phoenix_title vec2d

2d vector class, supports vector and scalar operators, and also provides a bunch of high level functions


class_hierarchy Inheritance Diagram

Inheritance diagram for class vec2d

Inheritance diagram of vec2d


property_summary Properties Summary

angle gets or sets the angle of a vector
length gets or sets the magnitude of the vector

api Class API



class vec2d(object)

2d vector class, supports vector and scalar operators, and also provides a bunch of high level functions


Methods



__init__(self, x_or_pair, y = None)


convert_to_basis(self, x_vector, y_vector)


cross(self, other)


dot(self, other)


get_angle(self)


get_angle_between(self, other)


get_dist_sqrd(self, other)


get_distance(self, other)


get_length(self)


get_length_sqrd(self)


interpolate_to(self, other, range)


normalize_return_length(self)


normalized(self)


perpendicular(self)


perpendicular_normal(self)


projection(self, other)


rotate(self, angle_degrees)


rotated(self, angle_degrees)

Properties



angle

See get_angle



length

See get_length