Clean up build.zig and examples

This commit affects the build.zig and examples files. It reformats the
code to meet a 120 column limit. It also adjusts comments so that
there is a space after the comment symbol '//' and the grammar in the
comments has been fixed.
This commit is contained in:
vent 2023-09-11 16:04:32 +01:00
parent 4dbbea186e
commit a378960088
9 changed files with 219 additions and 71 deletions

View file

@ -27,8 +27,17 @@ pub fn main() anyerror!void {
for (0..heights.len) |i| {
heights[i] = @as(f32, @floatFromInt(rl.getRandomValue(1, 12)));
positions[i] = rl.Vector3.init(@as(f32, @floatFromInt(rl.getRandomValue(-15, 15))), heights[i] / 2.0, @as(f32, @floatFromInt(rl.getRandomValue(-15, 15))));
colors[i] = rl.Color.init(@as(u8, @intCast(rl.getRandomValue(20, 255))), @as(u8, @intCast(rl.getRandomValue(10, 55))), 30, 255);
positions[i] = rl.Vector3.init(
@as(f32, @floatFromInt(rl.getRandomValue(-15, 15))),
heights[i] / 2.0,
@as(f32, @floatFromInt(rl.getRandomValue(-15, 15))),
);
colors[i] = rl.Color.init(
@as(u8, @intCast(rl.getRandomValue(20, 255))),
@as(u8, @intCast(rl.getRandomValue(10, 55))),
30,
255,
);
}
rl.setTargetFPS(60); // Set our game to run at 60 frames-per-second