Skip to content

Commit

Permalink
Bump Zig to 0.12.0-dev.2644+42fcca49c
Browse files Browse the repository at this point in the history
  • Loading branch information
SinclaM committed Feb 9, 2024
1 parent ae14613 commit 6e36594
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
.version = "0.0.0",
.dependencies = .{
.zigimg = .{
.url = "https://github.com/SinclaM/zigimg/archive/650b64edf1ceb70f38bcaf196b42df7336c9eb33.tar.gz",
.hash = "12203af19f62bb559971649325ebb825b8db60b80e6d0eb3daa9a5e98b562dce1fb5",
.url = "https://github.com/SinclaM/zigimg/archive/3c4f73a45bccc48cda4319a629a45d2469d8e24e.tar.gz",
.hash = "122073f8a28b8ad976c03ef25ba6230ce4c593b567a1341cd89ae723503fd53649b7",
},
},
.paths = .{
Expand Down
4 changes: 2 additions & 2 deletions src/raytracer/patterns/texture_map.zig
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub fn TextureMap(comptime T: type) type {
uv_pattern: UvPattern(T),

pub fn patternAt(self: @This(), pattern_point: Tuple(T), object_point: Tuple(T)) Color(T) {
const theta = std.math.atan2(T, pattern_point.x, pattern_point.z);
const theta = std.math.atan2(pattern_point.x, pattern_point.z);

const vec = Tuple(T).vec3(pattern_point.x, pattern_point.y, pattern_point.z);
const radius = vec.magnitude();
Expand Down Expand Up @@ -203,7 +203,7 @@ pub fn TextureMap(comptime T: type) type {
uv_pattern: UvPattern(T),

pub fn patternAt(self: @This(), pattern_point: Tuple(T), object_point: Tuple(T)) Color(T) {
const theta = std.math.atan2(T, pattern_point.x, pattern_point.z);
const theta = std.math.atan2(pattern_point.x, pattern_point.z);
const raw_u = theta / (2.0 * std.math.pi);
const u = 1.0 - (raw_u + 0.5);

Expand Down

0 comments on commit 6e36594

Please sign in to comment.