ds_grid_get_disk_sum(id,xm,ym,r)
Jump to navigation
Jump to search
Description
Returns the sum of the values in the specified disk in grid id.
Parameters
Parameter | Data Type | Description |
---|---|---|
id | int | index of the data structure grid |
xm | int | x coordinate of the center of the disk |
ym | int | y coordinate |
r | int | radius of the disk |
Return Values
Variant: Returns the sum of the cells in the disk of the grid.
Example Call
// demonstrates getting the sum of all cells in a disk region of a data structure grid
field_sum = ds_grid_get_disk_sum(grid_field, 50, 50, 50)