aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorManlio Perillo <manlio.perillo@gmail.com>2024-05-30 14:50:56 +0200
committerVeikka Tuominen <git@vexu.eu>2024-05-30 19:57:24 +0300
commite54fcdb5b290f2a7b2dad73f23e35289ad2ebefe (patch)
treec1a71bf5b626d301f3b03d248699b5b07c3bdcc0 /lib/std
parent103b885fc6660cad4bc596b6f43fad3905f4c1aa (diff)
downloadzig-e54fcdb5b290f2a7b2dad73f23e35289ad2ebefe.tar.gz
zig-e54fcdb5b290f2a7b2dad73f23e35289ad2ebefe.zip
std/math: import "math/float.zig" only once
math.zig imported the "math/float.zig" file multiple time, making the code unnecessarily more verbose.
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/math.zig27
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/std/math.zig b/lib/std/math.zig
index c7bd4fb9f4..9668d30698 100644
--- a/lib/std/math.zig
+++ b/lib/std/math.zig
@@ -1,5 +1,6 @@
const builtin = @import("builtin");
const std = @import("std.zig");
+const float = @import("math/float.zig");
const assert = std.debug.assert;
const mem = std.mem;
const testing = std.testing;
@@ -43,19 +44,19 @@ pub const rad_per_deg = 0.017453292519943295769236907684886127134428718885417254
/// 180.0/pi
pub const deg_per_rad = 57.295779513082320876798154814105170332405472466564321549160243861;
-pub const floatExponentBits = @import("math/float.zig").floatExponentBits;
-pub const floatMantissaBits = @import("math/float.zig").floatMantissaBits;
-pub const floatFractionalBits = @import("math/float.zig").floatFractionalBits;
-pub const floatExponentMin = @import("math/float.zig").floatExponentMin;
-pub const floatExponentMax = @import("math/float.zig").floatExponentMax;
-pub const floatTrueMin = @import("math/float.zig").floatTrueMin;
-pub const floatMin = @import("math/float.zig").floatMin;
-pub const floatMax = @import("math/float.zig").floatMax;
-pub const floatEps = @import("math/float.zig").floatEps;
-pub const floatEpsAt = @import("math/float.zig").floatEpsAt;
-pub const inf = @import("math/float.zig").inf;
-pub const nan = @import("math/float.zig").nan;
-pub const snan = @import("math/float.zig").snan;
+pub const floatExponentBits = float.floatExponentBits;
+pub const floatMantissaBits = float.floatMantissaBits;
+pub const floatFractionalBits = float.floatFractionalBits;
+pub const floatExponentMin = float.floatExponentMin;
+pub const floatExponentMax = float.floatExponentMax;
+pub const floatTrueMin = float.floatTrueMin;
+pub const floatMin = float.floatMin;
+pub const floatMax = float.floatMax;
+pub const floatEps = float.floatEps;
+pub const floatEpsAt = float.floatEpsAt;
+pub const inf = float.inf;
+pub const nan = float.nan;
+pub const snan = float.snan;
/// Performs an approximate comparison of two floating point values `x` and `y`.
/// Returns true if the absolute difference between them is less or equal than