ds_grid_get_disk_min

Gets the minimum from all the values within a circular region. Only works when the cells are numbers.

Syntax:

ds_grid_get_disk_min(index, xm, ym, r);


Argument Description
index The index of the grid.
xm The x position of the disk on the grid.
ym The y position of the disk on the grid.
r The radius of the disk on the grid.


Returns: Real or String


Description

This function can be used to find the minimum value for all the cells found within the defined disk area of a grid, as shown in the image below:


Example:

val = ds_grid_get_disk_min(grid, 5, 5, 2);

The above code will set the variable "val" to the minimum value contained within the given disk of the ds_grid indexed in the variable "grid".


Back: DS Grids
Next: ds_grid_get_disk_sum
© Copyright YoYo Games Ltd. 2018 All Rights Reserved