summaryrefslogtreecommitdiffstats
path: root/libdimension/cube.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/cube.c')
-rw-r--r--libdimension/cube.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/libdimension/cube.c b/libdimension/cube.c
index a6f656d..033d2fb 100644
--- a/libdimension/cube.c
+++ b/libdimension/cube.c
@@ -19,8 +19,7 @@
*************************************************************************/
#include "dimension.h"
-#include <stdlib.h> /* For malloc */
-#include <math.h> /* For sqrt */
+#include <math.h> /* For sqrt */
/*
* Cube
@@ -37,12 +36,10 @@ dmnsn_object *
dmnsn_new_cube()
{
dmnsn_object *cube = dmnsn_new_object();
- if (cube) {
- cube->intersection_fn = &dmnsn_cube_intersection_fn;
- cube->inside_fn = &dmnsn_cube_inside_fn;
- cube->bounding_box.min = dmnsn_new_vector(-1.0, -1.0, -1.0);
- cube->bounding_box.max = dmnsn_new_vector(1.0, 1.0, 1.0);
- }
+ cube->intersection_fn = &dmnsn_cube_intersection_fn;
+ cube->inside_fn = &dmnsn_cube_inside_fn;
+ cube->bounding_box.min = dmnsn_new_vector(-1.0, -1.0, -1.0);
+ cube->bounding_box.max = dmnsn_new_vector(1.0, 1.0, 1.0);
return cube;
}