Skip to content

Commit 9fff45b

Browse files
Fix compilation errors on Windows
1 parent 9d8d4e6 commit 9fff45b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

examples/raycast/Scene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Scene::Scene(Viewer* viewer, const std::string& shaderFolderPath, const std::str
107107
// Create the raycast lines
108108
void Scene::createLines() {
109109

110-
int nbRaysOneDimension = sqrt(NB_RAYS);
110+
int nbRaysOneDimension = std::sqrt(float(NB_RAYS));
111111

112112
for (int i=0; i<nbRaysOneDimension; i++) {
113113
for (int j=0; j<nbRaysOneDimension; j++) {

examples/raycast/Scene.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#define SCENE_H
2828

2929
// Libraries
30+
#define _USE_MATH_DEFINES
31+
#include <cmath>
3032
#include "openglframework.h"
3133
#include "reactphysics3d.h"
3234
#include "Sphere.h"

0 commit comments

Comments
 (0)