
This function computes the coordinates of a square's four corners based on a given center point and width.
Source:R/SpatialMultiomicAlignment.R
get_square_coordinates.RdThis function computes the coordinates of a square's four corners based on a given center point and width.
Value
A data frame with columns Selection, X, and Y representing the square's name and corner coordinates.
Examples
utils::str(formals(get_square_coordinates))
#> Dotted pair list of 4
#> $ center_x: symbol
#> $ center_y: symbol
#> $ width : symbol
#> $ name : symbol
get_square_coordinates(center_x = 5, center_y = 5, width = 4, name = "MySquare")
#> Selection X Y
#> 1 MySquare 3 3
#> 2 MySquare 7 3
#> 3 MySquare 7 7
#> 4 MySquare 3 7
#> 5 MySquare 3 3