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");
44const Self = @This();
55const color = @import("./mod.zig");
66
7c: f32, // cyan
8m: f32, // magenta
9y: f32, // yellow
10k: f32, // black
11a: f32, // alpha
7c: f32, // cyan [ 0 .. 1 ]
8m: f32, // magenta [ 0 .. 1 ]
9y: f32, // yellow [ 0 .. 1 ]
10k: f32, // black [ 0 .. 1 ]
11a: f32, // alpha [ 0 .. 1 ]
1212
1313pub fn initCMYKA(c: f32, m: f32, y: f32, k: f32, a: f32) Self {
1414 std.debug.assert(c >= 0.0 and c <= 1.0);
HSL.zig+4-4
......@@ -5,10 +5,10 @@ const Self = @This();
55const color = @import("./mod.zig");
66const _x = @import("./_x.zig");
77
8h: f32, // hue
9s: f32, // saturation
10l: f32, // luminance
11a: f32, // alpha
8h: f32, // hue [ 0 .. 1 ]
9s: f32, // saturation [ 0 .. 1 ]
10l: f32, // luminance [ 0 .. 1 ]
11a: f32, // alpha [ 0 .. 1 ]
1212
1313pub fn initHSLA(h: f32, s: f32, l: f32, a: f32) Self {
1414 std.debug.assert(h >= 0.0 and h <= 1.0);
HSV.zig+4-4
......@@ -5,10 +5,10 @@ const Self = @This();
55const color = @import("./mod.zig");
66const _x = @import("./_x.zig");
77
8h: f32, // hue
9s: f32, // saturation
10v: f32, // value
11a: f32, // alpha
8h: f32, // hue [ 0 .. 1 ]
9s: f32, // saturation [ 0 .. 1 ]
10v: f32, // value [ 0 .. 1 ]
11a: f32, // alpha [ 0 .. 1 ]
1212
1313pub fn initHSVA(h: f32, s: f32, v: f32, a: f32) Self {
1414 std.debug.assert(h >= 0.0 and h <= 1.0);
LinearRgb.zig+4-4
......@@ -6,10 +6,10 @@ const color = @import("./mod.zig");
66const _x = @import("./_x.zig");
77const vec4 = @Vector(4, f32);
88
9r: f32, // red
10g: f32, // green
11b: f32, // blue
12a: f32, // alpha
9r: f32, // red [ 0 .. 1]
10g: f32, // green [ 0 .. 1]
11b: f32, // blue [ 0 .. 1]
12a: f32, // alpha [ 0 .. 1]
1313
1414pub fn initRGBA(r: f32, g: f32, b: f32, a: f32) Self {
1515 std.debug.assert(r >= 0.0 and r <= 1.0);