Vec.kl

Types

Vec (struct)

The Vec represents a dense vector.

/*
** Example: Vec
*/

// create a 7-element vector
Vec vec(7);

Members

Scalar[] vals  

Methods

  Vec ( in Integer size )
  Vec ( in Vec that )
  Vec ()
Boolean almostEqual ? ( in Vec other )
Boolean almostEqual ? ( in Vec that, in Scalar precision )
  appendDesc ? ( io String string )
Vec clamp ? ( in Vec min, in Vec max )
Vec clone ? ()
Scalar dot ? ( in Vec that )
Boolean equal ? ( in Vec that )
Scalar get ? ( in Integer ind )
UInt32 hash ? ()
Vec head ? ( in Integer n )
Scalar length ? ()
Scalar lengthSquared ? ()
Vec linearInterpolate ? ( in Vec that, in Scalar t )
  normalize ! ()
  resize ! ( in Integer newSize )
  set ! ( in Integer ind, in Scalar val )
  setAll ! ( in Scalar val )
  setNull ! ()
Scalar setUnit ! ()
Integer size ? ()
String sizeDesc ? ()
Vec sub ? ( in Integer s, in Integer e )
Vec unit ? ()
Integer validateSize ? ( in Vec that, in String desc )

Operators

  - Vec
Vec = ( Param other )