add Metal material
This commit is contained in:
parent
b3c47a914f
commit
bc3fb54991
3 changed files with 45 additions and 11 deletions
|
@ -78,6 +78,10 @@ pub const Vec3 = packed struct {
|
|||
and math.absFloat(self.y) < t
|
||||
and math.absFloat(self.z) < t;
|
||||
}
|
||||
|
||||
pub fn reflect(self: Vec3, n: Vec3) Vec3 {
|
||||
return self.sub(n.mul_s(self.dot(n) * 2));
|
||||
}
|
||||
};
|
||||
|
||||
pub fn random(rng: *Random, min: f32, max: f32) Vec3 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue