Skip to content
FutureBlitz

    Install

    Import std.math.int_vector

    Vec3i

    std.math.int_vector

    struct

    Public Struct Vec3i Implements Numeric, Hashable, Printable, Defaultable

    A cell or step on a 3D grid.

    std/math/int_vector.fb, line 101

    • Public Field x: Int field #

      Its x component.

    • Public Field y: Int field #

      Its y component.

    • Public Field z: Int field #

      Its z component.

    • Public Static Method Zero(): Vec3i static method #

      The zero vector, (0, 0, 0).

    • Public Static Method One(): Vec3i static method #

      The vector (1, 1, 1), which multiplying leaves alone.

    • Public Static Method DefaultValue(): Vec3i static method #

      The zero vector, (0, 0, 0).

    • Public Method ToVec3(): Vec3 method #

      The components as Floats, rounded to the nearest one a Float holds.

    • Public Method ToString(): String method #

      Its components, as "(1, 2, 3)".

    • @PanicsAtCaller Operator [](index: Int): Int operator #

      The component at the index: x at 0, y at 1, and z at 2. Any other index panics.

    • @PanicsAtCaller Operator +(a: Vec3i, b: Vec3i): Vec3i operator #

      a plus b, component by component. Panics in a debug build when a component overflows, and wraps in a release one.

    • @PanicsAtCaller Operator -(a: Vec3i, b: Vec3i): Vec3i operator #

      a minus b, component by component. Panics in a debug build when a component overflows, and wraps in a release one.

    • @PanicsAtCaller Operator *(a: Vec3i, b: Vec3i): Vec3i operator #

      a times b, component by component. Panics in a debug build when a component overflows, and wraps in a release one.

    • @PanicsAtCaller Operator /(a: Vec3i, b: Vec3i): Vec3i operator #

      a divided by b, component by component. Each rounded toward 0. A component of 0 in b panics.

    • @PanicsAtCaller Operator *(a: Vec3i, scale: Int): Vec3i operator #

      a times scale.

    • @PanicsAtCaller Operator *(scale: Int, a: Vec3i): Vec3i operator #

      scale times a.

    • @PanicsAtCaller Operator /(a: Vec3i, scale: Int): Vec3i operator #

      a divided by scale.

    • @PanicsAtCaller Operator -(a: Vec3i): Vec3i operator #

      a negated.

    Report an issue with this page or with FutureBlitz on GitHub.