vec/dict/vec2f_dict

Values

pub fn anchor_position(
  dict: dict.Dict(vec2.Vec2(Float), value),
  at position: vec2.Vec2(Float),
  then fun: fn(dict.Dict(vec2.Vec2(Float), value)) -> dict.Dict(
    vec2.Vec2(Float),
    value,
  ),
) -> dict.Dict(vec2.Vec2(Float), value)

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

pub fn anchor_rotation(
  dict: dict.Dict(vec2.Vec2(Float), value),
  at angle: Float,
  then fun: fn(dict.Dict(vec2.Vec2(Float), value)) -> dict.Dict(
    vec2.Vec2(Float),
    value,
  ),
) -> dict.Dict(vec2.Vec2(Float), value)

Return the equivalent of dict |> rotate(-angle) |> fun() |> rotate(angle).

pub fn decoder(
  value: decode.Decoder(value),
) -> decode.Decoder(dict.Dict(vec2.Vec2(Float), value))

A decoder that decodes 2D float vec-dict.

pub fn mirror(
  in dict: dict.Dict(vec2.Vec2(Float), value),
  through normal: vec2.Vec2(Float),
) -> dict.Dict(vec2.Vec2(Float), value)

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

pub fn offset(
  in dict: dict.Dict(vec2.Vec2(Float), value),
  by vector: vec2.Vec2(Float),
) -> dict.Dict(vec2.Vec2(Float), value)

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

pub fn rotate(
  in dict: dict.Dict(vec2.Vec2(Float), value),
  by angle: Float,
) -> dict.Dict(vec2.Vec2(Float), value)

Rotate a vec-dict by an angle (in radians).

Search Document