Components1D

class Components1D(vec=None, *, normalize=False)

1D components (vector) class.

Initialize the components by a vector. Attributes x, y and z can be used to set the components.

Parameters:
  • vec (List[float] | None) – The initial vector. Defaults to None, resulted in a zero vector.

  • normalize (bool) – Whether to normalize the vector on creation.

Methods

normalize()

Normalize the vector to unit length.

Attributes

vec

Vector representation of the components.