authorgravatar for manlio.perillo@gmail.comManlio Perillo <manlio.perillo@gmail.com> 2024-05-30 14:50:56+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2024-05-30 19:57:24+03:00
loge54fcdb5b290f2a7b2dad73f23e35289ad2ebefe
treec1a71bf5b626d301f3b03d248699b5b07c3bdcc0
parent103b885fc6660cad4bc596b6f43fad3905f4c1aa

std/math: import "math/float.zig" only once

math.zig imported the "math/float.zig" file multiple time, making the code unnecessarily more verbose.

1 files changed, 14 insertions(+), 13 deletions(-)

lib/std/math.zig+14-13
...@@ -1,5 +1,6 @@...@@ -1,5 +1,6 @@
1const builtin = @import("builtin");1const builtin = @import("builtin");
2const std = @import("std.zig");2const std = @import("std.zig");
3const float = @import("math/float.zig");
3const assert = std.debug.assert;4const assert = std.debug.assert;
4const mem = std.mem;5const mem = std.mem;
5const testing = std.testing;6const testing = std.testing;
...@@ -43,19 +44,19 @@ pub const rad_per_deg = 0.017453292519943295769236907684886127134428718885417254...@@ -43,19 +44,19 @@ pub const rad_per_deg = 0.017453292519943295769236907684886127134428718885417254
43/// 180.0/pi44/// 180.0/pi
44pub const deg_per_rad = 57.295779513082320876798154814105170332405472466564321549160243861;45pub const deg_per_rad = 57.295779513082320876798154814105170332405472466564321549160243861;
4546
46pub const floatExponentBits = @import("math/float.zig").floatExponentBits;47pub const floatExponentBits = float.floatExponentBits;
47pub const floatMantissaBits = @import("math/float.zig").floatMantissaBits;48pub const floatMantissaBits = float.floatMantissaBits;
48pub const floatFractionalBits = @import("math/float.zig").floatFractionalBits;49pub const floatFractionalBits = float.floatFractionalBits;
49pub const floatExponentMin = @import("math/float.zig").floatExponentMin;50pub const floatExponentMin = float.floatExponentMin;
50pub const floatExponentMax = @import("math/float.zig").floatExponentMax;51pub const floatExponentMax = float.floatExponentMax;
51pub const floatTrueMin = @import("math/float.zig").floatTrueMin;52pub const floatTrueMin = float.floatTrueMin;
52pub const floatMin = @import("math/float.zig").floatMin;53pub const floatMin = float.floatMin;
53pub const floatMax = @import("math/float.zig").floatMax;54pub const floatMax = float.floatMax;
54pub const floatEps = @import("math/float.zig").floatEps;55pub const floatEps = float.floatEps;
55pub const floatEpsAt = @import("math/float.zig").floatEpsAt;56pub const floatEpsAt = float.floatEpsAt;
56pub const inf = @import("math/float.zig").inf;57pub const inf = float.inf;
57pub const nan = @import("math/float.zig").nan;58pub const nan = float.nan;
58pub const snan = @import("math/float.zig").snan;59pub const snan = float.snan;
5960
60/// Performs an approximate comparison of two floating point values `x` and `y`.61/// Performs an approximate comparison of two floating point values `x` and `y`.
61/// Returns true if the absolute difference between them is less or equal than62/// Returns true if the absolute difference between them is less or equal than