is_parallel() is a S3 method that tests whether two objects are parallel.
Usage
is_parallel(x, y, ...)
# S3 method for class 'Line2D'
is_parallel(x, y, ..., tolerance = sqrt(.Machine$double.eps))
# S3 method for class 'Plane3D'
is_parallel(x, y, ..., tolerance = sqrt(.Machine$double.eps))
Arguments
- x, y
The two objects to compute if they are parallel.
- ...
Passed to other methods (or ignored).
- tolerance
Numerics with differences smaller
than tolerance will be considered “equivalent”.
Examples
line1 <- as_line2d("x-axis")
line2 <- as_line2d("y-axis")
line3 <- as_line2d(a = 0, b = 1, c = 2) # y + 2 = 0
is_parallel(line1, line1)
#> [1] TRUE
is_parallel(line1, line2)
#> [1] FALSE
is_parallel(line1, line3)
#> [1] TRUE