Description Usage Arguments Value Examples
View source: R/anem_geoprocessing.R
Check point is in bounds
1 | check_point_side_of_line(line, x, y)
|
line |
list containing m and m |
x |
x coordinates |
y |
y coordinates |
Returns +1 for any point above the line, -1 for any point below the line, and 0 for a point on the line. If the line is vertical (m=Inf), returns +1 for points to the right of the line and -1 for points to the left of the line.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
x <- 100
y <- 100
line <- list(m=Inf,b=2)
check_point_side_of_line(list(m=Inf,b=2),0,0)
check_point_side_of_line(list(m=Inf,b=2),2,0)
check_point_side_of_line(list(m=Inf,b=2),3,0)
check_point_side_of_line(list(m=1,b=2),0,0)
check_point_side_of_line(list(m=1,b=2),0,2)
check_point_side_of_line(list(m=1,b=2),0,3)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.