isodi.utils

Undocumented in source.

Members

Functions

assign
void assign(T[] range, size_t index, size_t count, T value)

Assign multiple copies of the same value to the array, indexing it by chunks of the same size.

assignChunk
void assignChunk(T[] range, size_t index, T[] values)

Assign a single chunk of values to an array, assuming the array is made up of fixed size chunks.

mul
Matrix mul(Matrix[] ms)

Multiplying matrices the proper way

randomNumber
T randomNumber(T min, T max, RNG rng)

Get a random number in inclusive range.

randomVariant
Vector2I randomVariant(Vector2I atlasSize, Vector2I resultSize, ulong seed)

Generate a random variant in the given atlas. Param: atlasSize = Size of the atlas used. resultSize = Expected size of the result seed = Seed to use

reinterpret
To reinterpret(From from)

Perform a reinterpret cast.

structof
auto structof(T[size] value)

Make a simple struct out of a static array. Used to apply .tupleof on the arrays in DMD 2.099.

Structs

Ancestors
struct Ancestors

Iterate on file ancestors starting from root, ending on and including the file itself.

DeepAncestors
struct DeepAncestors

Iterate on file ancestors, starting from and including the requested file and ending on the root.

RectangleI
struct RectangleI
Undocumented in source.
Vector2I
struct Vector2I

Integer vector.

Templates

assignChunk
template assignChunk(alias fun)

Assign a single chunk of values to an array, altering the array first.

writefln
template writefln(T...)

Awful workaround to get writefln in @nogc :D Yes, it does allocate in the GC.

Meta