Skip to content

Commit

Permalink
custom shapes: simplify 3 constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Mar 2, 2024
1 parent 4dda677 commit 4d1777a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected CustomCone() {
* (>0)
*/
public CustomCone(float radius, float height) {
super(new Vector3f(radius, 0.75f * height, radius));
super(radius, 0.75f * height, radius);

Validate.positive(radius, "radius");
Validate.positive(height, "height");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ protected CustomCylinder() {
* (>0)
*/
public CustomCylinder(float radius, float height) {
super(new Vector3f(radius, 0.5f * height, radius));
super(radius, 0.5f * height, radius);

Validate.positive(radius, "radius");
Validate.positive(height, "height");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected CustomParaboloid() {
* (>0)
*/
public CustomParaboloid(float radius, float height) {
super(new Vector3f(radius, height / 1.5f, radius));
super(radius, height / 1.5f, radius);

Validate.positive(radius, "radius");
Validate.positive(height, "height");
Expand Down

0 comments on commit 4d1777a

Please sign in to comment.