Draw a rotating cube: Difference between revisions
m
→Zig: Update "works with". Simplify two lines involving casting and math.
m (→{{header|Wren}}: Changed to Wren S/H) |
Recombinant (talk | contribs) m (→Zig: Update "works with". Simplify two lines involving casting and math.) |
||
Line 3,595:
=={{header|Zig}}==
{{libheader|Raylib}}
{{works with|Zig|0.11.
<syntaxhighlight lang="zig">const std = @import("std");
const c = @cImport({
Line 3,613:
const position = c.Vector3{ .x = 0, .y = 0, .z = 0 };
const x_rot = 45;
const y_center: f32 = std.math.sqrt(
const z_rot = std.math.radiansToDegrees(f32, std.math.atan(@as(f32, std.math.sqrt1_2))
c.SetConfigFlags(c.FLAG_WINDOW_RESIZABLE | c.FLAG_VSYNC_HINT);
|