For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
coord_transform
def coord_transform[mode: CoordinateTransformationMode](out_coord: Int, in_dim: Int, out_dim: Int, scale: Float32) -> Float32
Maps an output coordinate to an input coordinate according to the given transformation mode.
Parameters:
- βmode (
CoordinateTransformationMode): The coordinate transformation mode governing the mapping.
Args:
- βout_coord (
Int): The output coordinate to map. - βin_dim (
Int): The size of the input dimension. - βout_dim (
Int): The size of the output dimension. - βscale (
Float32): The ratio of output dimension size to input dimension size.
Returns:
Float32: The corresponding input coordinate as a floating-point value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!