1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

Update math_functions.nu

This commit is contained in:
Kamil 2021-10-23 09:51:44 +00:00 committed by GitHub
parent ee5b1b654b
commit 4b4bd822c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,6 +17,11 @@ def aroot [ scaler: number, denominator: number, num: number ] {
$num ** ($scaler / $denominator) | math round
}
#discriminant of a quadratic equation
def delta [ a: number, b: number, c: number ] {
( $b | math sqrt ) - ( 4 * $a * $c)
}
#TODO:
# -sin, cos, tan table for 0-90 degrees
# -radians to degrees and reversed