# Class: staticarray

Staticarrays are created as plain C arrays within luxinia. They can be used for operations that require lot's of calculations or are used by other C functions.
'mounted' arrays do not have their own allocated data, but directly operate on their host data. Be aware that there is no mechanism to check whether host is still vaild, you will need to do this yourself.

## Hierarchy

    o-+ mathlib
      o-+ staticarray
        o-- floatarray
        o-- intarray

## Methods:

### Method overview:

- clamp
- count
- datapointer
- fromstring
- index
- mounted
- mountscalararray
- resize

clamp (staticarray self, value min, value max)
  returns: ()
  self = (self with values clamped to min,max)
count (staticarray)
  returns: (int)
  returns maximum number of elements
datapointer (staticarray self)
  returns: (pointer start, int end)
  you can access the memory directly in other lua dlls. Be aware that you must make sure to not corrupt memory, make sure you are always smaller than the 'end' pointer.
fromstring (staticarray self, binstring, [int offset])
  returns: ()
  copies the data from a binary string. Copies as much as possible.
index (staticarray,index,[float/int value])
  returns: ([value])
  assigns index the value if given or simply returns the value at the index. Returns error in case of invalid indices.
mounted (staticarray)
  returns: (boolean)
  returns whether array is mounted, i.e. points to external memory.
mountscalararray (staticarray,[int vectorsize])
  returns: (scalararray)
  returns a mounted scalararray from current array.
resize (staticarray self, int size)
  returns: ()
  Changes size of array. If new size is greater old size, old content is preserved.

## Inherited Methods:

### From mathlib

quatslerpq, quatslerpqt