API Reference › IVec2 › IVec2.scale
method

IVec2.scale

IVec2.scale(v, s) -> IVec2

Multiplies both components by an integer scalar — useful to convert a cell coordinate into a pixel offset by the tile size.

Example

program Demo {
  handler Step phase Update {
    let px = IVec2.scale(cell, 16)
  }
}
← All symbols