mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
change log2 implementation to use C.log2()
This commit is contained in:
parent
7701be2242
commit
06e7354d18
@ -157,7 +157,7 @@ pub fn log(a f64) f64 {
|
||||
|
||||
// log2 calculates base-2 logarithm of the provided value.
|
||||
pub fn log2(a f64) f64 {
|
||||
return C.log(a) / C.log(2)
|
||||
return C.log2(a)
|
||||
}
|
||||
|
||||
// log10 calculates the common (base-10) logarithm of the provided value.
|
||||
|
Loading…
Reference in New Issue
Block a user