authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-12-30 01:46:44 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2024-12-30 01:46:44 -08:00
log5aaaebb7f77a6737c10dd7be77926019e0f32ab4
treeabed94448e12e20b4d758d8dc6f3be25f1f8c2c0
parent36f4989aee0406ab6ea7802fdac1fe8a45ea89d7

add range comments


4 files changed, 17 insertions(+), 17 deletions(-)

CMYK.zig+5-5
...@@ -4,11 +4,11 @@ const std = @import("std");...@@ -4,11 +4,11 @@ const std = @import("std");
4const Self = @This();4const Self = @This();
5const color = @import("./mod.zig");5const color = @import("./mod.zig");
66
7c: f32, // cyan7c: f32, // cyan [ 0 .. 1 ]
8m: f32, // magenta8m: f32, // magenta [ 0 .. 1 ]
9y: f32, // yellow9y: f32, // yellow [ 0 .. 1 ]
10k: f32, // black10k: f32, // black [ 0 .. 1 ]
11a: f32, // alpha11a: f32, // alpha [ 0 .. 1 ]
1212
13pub fn initCMYKA(c: f32, m: f32, y: f32, k: f32, a: f32) Self {13pub fn initCMYKA(c: f32, m: f32, y: f32, k: f32, a: f32) Self {
14 std.debug.assert(c >= 0.0 and c <= 1.0);14 std.debug.assert(c >= 0.0 and c <= 1.0);
HSL.zig+4-4
...@@ -5,10 +5,10 @@ const Self = @This();...@@ -5,10 +5,10 @@ const Self = @This();
5const color = @import("./mod.zig");5const color = @import("./mod.zig");
6const _x = @import("./_x.zig");6const _x = @import("./_x.zig");
77
8h: f32, // hue8h: f32, // hue [ 0 .. 1 ]
9s: f32, // saturation9s: f32, // saturation [ 0 .. 1 ]
10l: f32, // luminance10l: f32, // luminance [ 0 .. 1 ]
11a: f32, // alpha11a: f32, // alpha [ 0 .. 1 ]
1212
13pub fn initHSLA(h: f32, s: f32, l: f32, a: f32) Self {13pub fn initHSLA(h: f32, s: f32, l: f32, a: f32) Self {
14 std.debug.assert(h >= 0.0 and h <= 1.0);14 std.debug.assert(h >= 0.0 and h <= 1.0);
HSV.zig+4-4
...@@ -5,10 +5,10 @@ const Self = @This();...@@ -5,10 +5,10 @@ const Self = @This();
5const color = @import("./mod.zig");5const color = @import("./mod.zig");
6const _x = @import("./_x.zig");6const _x = @import("./_x.zig");
77
8h: f32, // hue8h: f32, // hue [ 0 .. 1 ]
9s: f32, // saturation9s: f32, // saturation [ 0 .. 1 ]
10v: f32, // value10v: f32, // value [ 0 .. 1 ]
11a: f32, // alpha11a: f32, // alpha [ 0 .. 1 ]
1212
13pub fn initHSVA(h: f32, s: f32, v: f32, a: f32) Self {13pub fn initHSVA(h: f32, s: f32, v: f32, a: f32) Self {
14 std.debug.assert(h >= 0.0 and h <= 1.0);14 std.debug.assert(h >= 0.0 and h <= 1.0);
LinearRgb.zig+4-4
...@@ -6,10 +6,10 @@ const color = @import("./mod.zig");...@@ -6,10 +6,10 @@ const color = @import("./mod.zig");
6const _x = @import("./_x.zig");6const _x = @import("./_x.zig");
7const vec4 = @Vector(4, f32);7const vec4 = @Vector(4, f32);
88
9r: f32, // red9r: f32, // red [ 0 .. 1]
10g: f32, // green10g: f32, // green [ 0 .. 1]
11b: f32, // blue11b: f32, // blue [ 0 .. 1]
12a: f32, // alpha12a: f32, // alpha [ 0 .. 1]
1313
14pub fn initRGBA(r: f32, g: f32, b: f32, a: f32) Self {14pub fn initRGBA(r: f32, g: f32, b: f32, a: f32) Self {
15 std.debug.assert(r >= 0.0 and r <= 1.0);15 std.debug.assert(r >= 0.0 and r <= 1.0);