Minor rewording
This commit is contained in:
parent
a970c91891
commit
0730b9f6c4
@ -18,9 +18,12 @@ const Vector2D = packed struct {
|
|||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
|
|
||||||
fn add(a: *i32, b: i32) i32 {
|
fn add(a: i32, b: i32) i32 {
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn setTo3(a: *i32) void {
|
||||||
a.* = 3;
|
a.* = 3;
|
||||||
return a.* + b;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Error unions
|
// Error unions
|
||||||
@ -37,7 +40,7 @@ fn divide(a: f32, b: f32) !f32 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Optional
|
// Comptime generics
|
||||||
|
|
||||||
fn Optional(comptime T: type) type {
|
fn Optional(comptime T: type) type {
|
||||||
return struct {
|
return struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user