inst/tinytest/test_secprop.R

test_secprop <- function() {

x <- c(1, 0, -1, 0)
y <- c(0, 1, 0, -1)

x1 <- -10.000000
y1 <- 10.000000

expect_equal(atan2d(y, x), c(0, 90, 180, -90))
expect_equal(atan2d(y1, x1), 135)
expect_error(atan2d(pi * 3 / 4))
expect_error(atan2d("sq"))

  invisible(NULL)
}

test_secprop()

Try the iemisc package in your browser

Any scripts or data that you put into this service are public.

iemisc documentation built on Sept. 25, 2023, 5:09 p.m.