add bounding box to sphere
parent
8b7b99b184
commit
a84ed5c050
@ -0,0 +1,10 @@
|
||||
package eu.jonahbauer.raytracing.math;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public record BoundingBox(@NotNull Vec3 min, @NotNull Vec3 max) {
|
||||
|
||||
public @NotNull Vec3 center() {
|
||||
return Vec3.average(min, max, 2);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue