Kaynağa Gözat

Remove old math constants

gingerBill 7 yıl önce
ebeveyn
işleme
0361a18551
2 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 0 2
      core/math.odin
  2. 3 0
      core/strconv.odin

+ 0 - 2
core/math.odin

@@ -1,7 +1,5 @@
 TAU          :: 6.28318530717958647692528676655900576;
 PI           :: 3.14159265358979323846264338327950288;
-ONE_OVER_TAU :: 0.636619772367581343075535053490057448;
-ONE_OVER_PI  :: 0.159154943091895335768883763372514362;
 
 E            :: 2.71828182845904523536;
 SQRT_TWO     :: 1.41421356237309504880168872420969808;

+ 3 - 0
core/strconv.odin

@@ -117,6 +117,9 @@ parse_f32 :: proc(s: string) -> f32 {
 
 
 parse_f64 :: proc(s: string) -> f64 {
+	if s == "" {
+		return 0;
+	}
 	i := 0;
 
 	sign: f64 = 1;