Skip to content

Commit

Permalink
Remainder Graphlite changes for use in Godot Engine.
Browse files Browse the repository at this point in the history
  • Loading branch information
fire committed Apr 21, 2022
1 parent fd72eb9 commit 7710208
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions manifold/src/constructors.cu
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Manifold Manifold::Cube(glm::vec3 size, bool center) {
Manifold Manifold::Cylinder(float height, float radiusLow, float radiusHigh,
int circularSegments, bool center) {
float scale = radiusHigh >= 0.0f ? radiusHigh / radiusLow : 1.0f;
float radius = max(radiusLow, radiusHigh);
float radius = fmax(radiusLow, radiusHigh);
int n = circularSegments > 2 ? circularSegments : GetCircularSegments(radius);
Polygons circle(1);
float dPhi = 360.0f / n;
Expand Down Expand Up @@ -283,7 +283,7 @@ Manifold Manifold::Revolve(const Polygons& crossSection, int circularSegments) {
float radius = 0.0f;
for (const auto& poly : crossSection) {
for (const auto& vert : poly) {
radius = max(radius, vert.pos.x);
radius = fmax(radius, vert.pos.x);
}
}
int nDivisions =
Expand Down
2 changes: 2 additions & 0 deletions utilities/include/sparse.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "utils.cuh"
#include "vec_dh.cuh"

#include <math.h>

namespace manifold {

/** @ingroup Private */
Expand Down

0 comments on commit 7710208

Please sign in to comment.