Browse Source

Merge pull request #4643 from karl-zylinski/fix-vendor-libc-sin-log-types

Fix for vendor:libc using wrong types for log and sin procs.
Laytan 7 months ago
parent
commit
8763b15c61
2 changed files with 4 additions and 4 deletions
  1. 2 2
      vendor/libc/include/math.h
  2. 2 2
      vendor/libc/math.odin

+ 2 - 2
vendor/libc/include/math.h

@@ -17,5 +17,5 @@ double fabs(double x);
 int abs(int);
 double ldexp(double, int);
 double exp(double);
-float log(float);
-float sin(float);
+double log(double);
+double sin(double);

+ 2 - 2
vendor/libc/math.odin

@@ -90,11 +90,11 @@ exp :: proc "c" (x: f64) -> f64 {
 }
 
 @(require, linkage="strong", link_name="log")
-log :: proc "c" (x: f32) -> f32 {
+log :: proc "c" (x: f64) -> f64 {
 	return math.ln(x)
 }
 
 @(require, linkage="strong", link_name="sin")
-sin :: proc "c" (x: f32) -> f32 {
+sin :: proc "c" (x: f64) -> f64 {
 	return math.sin(x)
 }