Skip to content

Commit b7e0960

Browse files
committed
Added acsc tests
1 parent 29d521e commit b7e0960

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/trig.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,15 @@ pub mod trig_functions {
307307
}
308308

309309
/// Returns the inverse cosecant in radians
310+
/// ```typescript
311+
/// assert_eq(acsc(-1.0), -pi/2)
312+
/// ```
313+
/// ```typescript
314+
/// assert_eq(acsc(1.0/0.0), 0.0)
315+
/// ```
316+
/// ```typescript
317+
/// assert_eq(acsc(1.0), pi/2)
318+
/// ```
310319
#[rhai_fn(name = "acsc")]
311320
pub fn acsc(x: FLOAT) -> FLOAT {
312321
FLOAT::asin(1.0 / x)

0 commit comments

Comments
 (0)