mirror of
https://github.com/vlang/v.git
synced 2025-09-12 17:07:11 -04:00
math: add missing docstrings for math.log_gamma_sign and for the complex.complex constructor function (#19523)
This commit is contained in:
parent
b9a1b0c269
commit
efef5bcc89
@ -12,6 +12,7 @@ pub mut:
|
||||
im f64
|
||||
}
|
||||
|
||||
// complex returns a complex struct with the given `re` and `im`
|
||||
pub fn complex(re f64, im f64) Complex {
|
||||
return Complex{re, im}
|
||||
}
|
||||
@ -30,6 +31,7 @@ pub fn (c Complex) abs() f64 {
|
||||
return math.hypot(c.re, c.im)
|
||||
}
|
||||
|
||||
// mod returns the modulus value of `c`
|
||||
pub fn (c Complex) mod() f64 {
|
||||
return c.abs()
|
||||
}
|
||||
|
@ -139,6 +139,7 @@ pub fn log_gamma(x f64) f64 {
|
||||
return y
|
||||
}
|
||||
|
||||
// log_gamma_sign returns the natural logarithm and sign (-1 or +1) of Gamma(x)
|
||||
pub fn log_gamma_sign(a f64) (f64, int) {
|
||||
mut x := a
|
||||
ymin := 1.461632144968362245
|
||||
|
Loading…
x
Reference in New Issue
Block a user