Rename box generator extent to half_extent

This commit is contained in:
Jarrod Doyle 2023-09-25 10:50:01 +01:00
parent dd73410d0a
commit d41909860e
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ use csg::{
plane::Plane,
};
fn generate_box_brush(position: Vec3, extent: Vec3) -> Brush {
fn generate_box_brush(position: Vec3, half_extent: Vec3) -> Brush {
let normals = vec![
glam::vec3(1.0, 0.0, 0.0),
glam::vec3(-1.0, 0.0, 0.0),
@ -16,7 +16,7 @@ fn generate_box_brush(position: Vec3, extent: Vec3) -> Brush {
let mut brush_planes = vec![];
for normal in &normals {
let point = position + *normal * extent;
let point = position + *normal * half_extent;
brush_planes.push(BrushPlane {
plane: Plane::from_point_normal(point, *normal),