Various bug fixes + Material setters

This commit is contained in:
Crizomb 2025-09-27 02:37:11 +02:00
parent e35cca1830
commit f5c912c489
5 changed files with 53 additions and 22 deletions

View file

@ -4,11 +4,11 @@ package main
type Sphere struct {
center Vector3
radius float64
material Material
material *Material
}
func (s Sphere) Distance(p Vector3) (float64, Material) {
return p.Sub(s.center).Length() - s.radius, s.material
return p.Sub(s.center).Length() - s.radius, *s.material
}
// Box