Planar logo

Previous topic

planar.Vec2 – 2D Vectors

Next topic

planar.Affine – 2D Affine Transforms

This Page

planar.Vec2Array – 2D Vector Arrays

class planar.Vec2Array

Dynamic vector array

static from_points()
Create a new 2D sequence from an iterable of points
almost_equals
Compare for approximate equality.
append
Append all vectors in iterable to the end of the array.
clamp
Clamp the length of the vectors in this array in place between min_length and max_length.
clamped
Create a new array of vectors with lengths clamped between min_length and max_length.
extend
Extend an array appending vectors from the given sequence.
insert
Insert a vector at the specified index.
longest
Return the vector in the array with the maximum length.
normalize
Normalize the vectors in the array in place.
normalized
Create a new array containing normalized vectors calculated from this array.
shortest
Return the vector in the array with the minimum length.
class planar.Seq2

Fixed length vector sequence

static from_points()
Create a new 2D sequence from an iterable of points
almost_equals
Compare for approximate equality.