1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

remove from the language

This commit is contained in:
Alexander Medvednikov
2019-08-22 23:19:31 +03:00
parent 2eb9440095
commit dcfc9eb1a1
4 changed files with 135 additions and 145 deletions

View File

@ -6,10 +6,6 @@ module builtin
#include <float.h>
import const (
DBL_EPSILON
)
pub fn (d double) str() string {
buf := malloc(sizeof(double) * 5 + 1)// TODO
C.sprintf(buf, '%f', d)
@ -36,7 +32,7 @@ pub fn ptr_str(ptr voidptr) string {
// compare floats using C epsilon
pub fn (a f64) eq(b f64) bool {
return C.fabs(a - b) <= DBL_EPSILON
return C.fabs(a - b) <= C.DBL_EPSILON
}
// fn (nn i32) str() string {