Skip to content

Commit af7ac96

Browse files
authored
math: remove usingnamespace in favour of mixins (#1231)
1 parent 42d2a57 commit af7ac96

5 files changed

Lines changed: 844 additions & 622 deletions

File tree

src/math/main.zig

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,34 +50,34 @@ const ray = @import("ray.zig");
5050
pub const collision = @import("collision.zig");
5151

5252
/// Standard f32 precision types
53-
pub const Vec2 = vec.Vec(2, f32);
54-
pub const Vec3 = vec.Vec(3, f32);
55-
pub const Vec4 = vec.Vec(4, f32);
53+
pub const Vec2 = vec.Vec2(f32);
54+
pub const Vec3 = vec.Vec3(f32);
55+
pub const Vec4 = vec.Vec4(f32);
5656
pub const Quat = q.Quat(f32);
57-
pub const Mat2x2 = mat.Mat(2, 2, Vec2);
58-
pub const Mat3x3 = mat.Mat(3, 3, Vec3);
59-
pub const Mat4x4 = mat.Mat(4, 4, Vec4);
60-
pub const Ray = ray.Ray(Vec3);
57+
pub const Mat2x2 = mat.Mat2x2(f32);
58+
pub const Mat3x3 = mat.Mat3x3(f32);
59+
pub const Mat4x4 = mat.Mat4x4(f32);
60+
pub const Ray = ray.Ray3(f32);
6161

6262
/// Half-precision f16 types
63-
pub const Vec2h = vec.Vec(2, f16);
64-
pub const Vec3h = vec.Vec(3, f16);
65-
pub const Vec4h = vec.Vec(4, f16);
63+
pub const Vec2h = vec.Vec2(f16);
64+
pub const Vec3h = vec.Vec3(f16);
65+
pub const Vec4h = vec.Vec4(f16);
6666
pub const Quath = q.Quat(f16);
67-
pub const Mat2x2h = mat.Mat(2, 2, Vec2h);
68-
pub const Mat3x3h = mat.Mat(3, 3, Vec3h);
69-
pub const Mat4x4h = mat.Mat(4, 4, Vec4h);
70-
pub const Rayh = ray.Ray(Vec3h);
67+
pub const Mat2x2h = mat.Mat2x2(f16);
68+
pub const Mat3x3h = mat.Mat3x3(f16);
69+
pub const Mat4x4h = mat.Mat4x4(f16);
70+
pub const Rayh = ray.Ray3(f16);
7171

7272
/// Double-precision f64 types
73-
pub const Vec2d = vec.Vec(2, f64);
74-
pub const Vec3d = vec.Vec(3, f64);
75-
pub const Vec4d = vec.Vec(4, f64);
73+
pub const Vec2d = vec.Vec2(f64);
74+
pub const Vec3d = vec.Vec3(f64);
75+
pub const Vec4d = vec.Vec4(f64);
7676
pub const Quatd = q.Quat(f64);
77-
pub const Mat2x2d = mat.Mat(2, 2, Vec2d);
78-
pub const Mat3x3d = mat.Mat(3, 3, Vec3d);
79-
pub const Mat4x4d = mat.Mat(4, 4, Vec4d);
80-
pub const Rayd = ray.Ray(Vec3d);
77+
pub const Mat2x2d = mat.Mat2x2(f64);
78+
pub const Mat3x3d = mat.Mat3x3(f64);
79+
pub const Mat4x4d = mat.Mat4x4(f64);
80+
pub const Rayd = ray.Ray3(f64);
8181

8282
/// Standard f32 precision initializers
8383
pub const vec2 = Vec2.init;

0 commit comments

Comments
 (0)