Skip to content

bloqade.geometry.dialects.grid.get

← Module overview

functiongetsource

bloqade.geometry.dialects.grid.get

def get(grid: Grid, idx: tuple[int, int]) -> tuple[float, float]

Get the coordinate (x, y) of a grid at the given index.

Returns: tuple[float, float]: a tuple of (x, y) positions tuple[None, None]: if the grid has no initial x or y position

Parameters

NameTypeDescription
gridGrida grid object
idxtuple[int, int]a tuple of (x, y) indices

Returns

tuple[float, float]

source