summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2022-12-16 18:38:01 +0100
committerTom Barrett <tom@tombarrett.xyz>2022-12-16 18:38:01 +0100
commit70ac042b7d69d1e9113fc6835859059040074edb (patch)
treed64061b2b58b7352d95444f83421bfe5e757d0a7 /src
parentb31f1d5379c61373f672fc689705acf902ad9cf9 (diff)
v10
Diffstat (limited to 'src')
-rw-r--r--src/main.zig22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main.zig b/src/main.zig
index ffaf130..6801150 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -142,19 +142,19 @@ pub fn scale_cube(cube: Cube, scale: f32) Cube {
pub fn draw_axis(arena: *ArenaAllocator, instance: sdl.instance) void {
var o = center_point(
- project_point(arena, Point{ .x = 00, .y = 00, .z = 00 }),
+ project_point(arena, Point{ .x = 0, .y = 0, .z = 0 }),
250,
);
var x = center_point(
- project_point(arena, Point{ .x = 50, .y = 00, .z = 00 }),
+ project_point(arena, Point{ .x = 50, .y = 0, .z = 0 }),
250,
);
var y = center_point(
- project_point(arena, Point{ .x = 00, .y = 50, .z = 00 }),
+ project_point(arena, Point{ .x = 0, .y = 50, .z = 0 }),
250,
);
var z = center_point(
- project_point(arena, Point{ .x = 00, .y = 00, .z = 50 }),
+ project_point(arena, Point{ .x = 0, .y = 0, .z = 50 }),
250,
);
@@ -173,13 +173,13 @@ pub fn main() anyerror!void {
const unit_cube = Cube{
.points = [8]Point{
- Point{ .x = 01, .y = 01, .z = 01 },
- Point{ .x = 01, .y = 01, .z = -1 },
- Point{ .x = 01, .y = -1, .z = 01 },
- Point{ .x = 01, .y = -1, .z = -1 },
- Point{ .x = -1, .y = 01, .z = 01 },
- Point{ .x = -1, .y = 01, .z = -1 },
- Point{ .x = -1, .y = -1, .z = 01 },
+ Point{ .x = 1, .y = 1, .z = 1 },
+ Point{ .x = 1, .y = 1, .z = -1 },
+ Point{ .x = 1, .y = -1, .z = 1 },
+ Point{ .x = 1, .y = -1, .z = -1 },
+ Point{ .x = -1, .y = 1, .z = 1 },
+ Point{ .x = -1, .y = 1, .z = -1 },
+ Point{ .x = -1, .y = -1, .z = 1 },
Point{ .x = -1, .y = -1, .z = -1 },
},
};