Skip to content
CShift0.32

Fixed<T,

Struct · built-in type

struct Fixed<T, N>

A fixed-size array stored inline: Fixed<int, 16> is 16 ints inside the variable or struct, with no allocation.

struct Palette { Fixed<uint16, 32> Colors; }
var p = Palette { };
p.Colors[3] = 0x0F00;

A Fixed is a value: assigning it copies all elements. Indexing is checked; foreach and slicing work like on arrays. C arrays in imported C structs become Fixed.

Name Description
Length The number of elements, N (a constant).
int Length

The number of elements, N (a constant).

Name Description
ToArray A new array with the elements.
T[] ToArray()

A new array with the elements.