This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const Channel = std.event.Channel; | |
| const Timer = std.time.Timer; | |
| const warn = std.debug.warn; | |
| pub const io_mode = .evented; | |
| // Send the sequence 2, 3, 4, ... to channel 'ch'. | |
| fn generate(ch: *Channel(u32)) void { | |
| var i: u32 = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pub const NV_ray_tracing = 1; | |
| pub const AccelerationStructureNV = *@OpaqueType(); | |
| pub const NV_RAY_TRACING_SPEC_VERSION = 3; | |
| pub const NV_RAY_TRACING_EXTENSION_NAME = "VK_NV_ray_tracing"; | |
| pub const SHADER_UNUSED_NV = (~@as(u32, 0)); | |
| pub const AccelerationStructureTypeNV = extern enum(i32) { | |
| TOP_LEVEL = 0, | |
| BOTTOM_LEVEL = 1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| pub fn VLA(comptime ArrayType: type, comptime ParentStruct: type, comptime fieldName: []u8) type { | |
| return struct { | |
| const headerSize: usize = comptime std.mem.alignForward(@sizeOf(ParentStruct), @alignOf(ArrayType)); | |
| const headerAlign: u29 = comptime std.math.max(@alignOf(ArrayType), @alignOf(ParentStruct)); | |
| len: usize, | |
| pub fn get(self: *@This()) []ArrayType { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const JsonString = struct { | |
| value: []const u8, | |
| }; | |
| const JsonNumber = struct { | |
| value: f64, | |
| }; | |
| const JsonObject = struct { | |
| const Property = struct { | |
| name: []const u8, | |
| value: JsonValue, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cstdlib> | |
| #include <vector> | |
| #include <cmath> | |
| #include <glm/glm.hpp> | |
| #include <stb/stb_image.h> | |
| #include "gl_includes.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.badlogic.gdx.math.Vector2; | |
| import com.badlogic.gdx.utils.Array; | |
| /** | |
| * This class computes whether two points are adjacent in the Delaunay Triangulation of a set of points. | |
| * Throughout the implementation, it makes the assumption that points can be compared with reference equality for uniqueness. | |
| */ | |
| public abstract class DelaunayAdjacency { | |
| private static final float EPSILON = 0.000001f; |
NewerOlder