is_congruent | R Documentation |
is_congruent()
is a S3 generic that tests whether two different objects are “congruent”.
The is_congruent()
method for angle()
classes tests whether two angles are congruent.
is_congruent(x, y, ...)
## S3 method for class 'numeric'
is_congruent(x, y, ..., tolerance = sqrt(.Machine$double.eps))
## S3 method for class 'angle'
is_congruent(
x,
y,
...,
mod_turns = TRUE,
tolerance = sqrt(.Machine$double.eps)
)
x , y |
Two objects to test whether they are “"congruent"”. |
... |
Further arguments passed to or from other methods. |
tolerance |
Angles (coerced to half-turns) or numerics with differences smaller
than |
mod_turns |
If |
A logical vector
# Use `is_congruent()` to check if two angles are "congruent"
a1 <- angle(180, "degrees")
a2 <- angle(pi, "radians")
a3 <- angle(-180, "degrees") # Only congruent modulus full turns
a1 == a2
isTRUE(all.equal(a1, a2))
is_congruent(a1, a2)
is_congruent(a1, a2, mod_turns = FALSE)
a1 == a3
isTRUE(all.equal(a1, a3))
is_congruent(a1, a3)
is_congruent(a1, a3, mod_turns = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.