- class V4i
A signed 32 bits integer 3-element vector.
- x:int
- y:int
- z:int
- w:int
- V4i()
Uninitialized by default
- V4i(a: int)
Initialize to a scalar (a,a,a,a)
- V4i(a: int, b: int, c: int, d: int)
Initialize to given elements (a,b,c,d)
- __getitem__(i: int) int
Element access by index.
- equalWithAbsError(m: V4i, e: int) bool
Compare two vectors and test if they are “approximately equal”: Return True if the coefficients of this and m are the same with an absolute error of no more than e, i.e., for all i, j:
abs (this[i][j] - m[i][j]) <= e
- equalWithRelError(m: V4i, e: int) bool
Compare two vectors and test if they are “approximately equal”: Return True if the coefficients of this and m are the same with a relative error of no more than e, i.e., for all i, j:
abs (this[i] - v[i][j]) <= e * abs (this[i][j])
- length() int
Return the Euclidean norm
- length2() int
Return the square of the Euclidean norm, i.e. the dot product with itself.