CAM(PathSimulator): Use single-precision pi

All of PathSimulator uses floats, rather than doubles: to prevent
compiler warnings about truncation, explicitly use the single-precision
version of the standard pi constant.
This commit is contained in:
Chris Hennes
2025-05-31 17:57:24 -05:00
parent 239a05b242
commit 67435e22ca
3 changed files with 2 additions and 4 deletions

View File

@@ -27,7 +27,7 @@
#include "GlUtils.h"
#include <iostream>
using std::numbers::pi;
constexpr auto pi = std::numbers::pi_v<float>;
#define N_MILL_SLICES 8
#define MAX_SEG_DEG (pi / 2.0f) // 90 deg

View File

@@ -36,8 +36,6 @@
namespace MillSim
{
using std::numbers::pi;
void SimDisplay::InitShaders()
{
// use shaders

View File

@@ -34,7 +34,7 @@
namespace MillSim
{
using std::numbers::pi;
constexpr auto pi = std::numbers::pi_v<float>;
struct Point3D
{