vec/dict/vec4i_dict

Types

A dictionary with 4D integer vector as keys.

pub type Vec4iDict(value) =
  dict.Dict(vec4.Vec4(Int), value)

Values

pub fn anchor_position(
  dict: dict.Dict(vec4.Vec4(Int), value),
  at position: vec4.Vec4(Int),
  then fun: fn(dict.Dict(vec4.Vec4(Int), value)) -> dict.Dict(
    vec4.Vec4(Int),
    value,
  ),
) -> dict.Dict(vec4.Vec4(Int), value)

Return the equivalent of dict |> offset(vec4i.negate(position)) |> fun() |> offset(position).

pub fn mirror(
  in dict: dict.Dict(vec4.Vec4(Int), value),
  through normal: vec4.Vec4(Int),
) -> dict.Dict(vec4.Vec4(Int), value)

Returns the mirror of a vec-dict through a plane defined by the given normal vector.

pub fn new_rectangle(
  from start: vec4.Vec4(Int),
  to stop: vec4.Vec4(Int),
  with fun: fn(vec4.Vec4(Int)) -> value,
) -> dict.Dict(vec4.Vec4(Int), value)

Returns a new rectangle vec-dict from start to stop fill with values return from fun.

pub fn offset(
  in dict: dict.Dict(vec4.Vec4(Int), value),
  by vector: vec4.Vec4(Int),
) -> dict.Dict(vec4.Vec4(Int), value)

Returns a new vec-dict containing the key offset by vector.

Search Document