1
0
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:
eulerkochy 2019-07-11 11:56:31 +05:30 committed by Alexander Medvednikov
parent 7701be2242
commit 06e7354d18

View File

@ -157,7 +157,7 @@ pub fn log(a f64) f64 {
// log2 calculates base-2 logarithm of the provided value. // log2 calculates base-2 logarithm of the provided value.
pub fn log2(a f64) f64 { 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. // log10 calculates the common (base-10) logarithm of the provided value.