mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-31 17:12:56 +00:00
GCode Preview - Code cleanup
This commit is contained in:
@@ -163,29 +163,12 @@ static inline T clamp(const T low, const T high, const T value)
|
||||
return std::max(low, std::min(high, value));
|
||||
}
|
||||
|
||||
//############################################################################################################
|
||||
#define ENRICO_GCODE_PREVIEW 1
|
||||
//############################################################################################################
|
||||
|
||||
//############################################################################################################
|
||||
#if ENRICO_GCODE_PREVIEW
|
||||
template <typename T, typename Number>
|
||||
static inline T lerp(const T& a, const T& b, Number t)
|
||||
{
|
||||
assert((t >= Number(-EPSILON)) && (t <= Number(1) + Number(EPSILON)));
|
||||
return (Number(1) - t) * a + t * b;
|
||||
}
|
||||
#else
|
||||
//############################################################################################################
|
||||
template <typename T>
|
||||
static inline T lerp(const T a, const T b, const T t)
|
||||
{
|
||||
assert(t >= T(-EPSILON) && t <= T(1.+EPSILON));
|
||||
return (1. - t) * a + t * b;
|
||||
}
|
||||
//############################################################################################################
|
||||
#endif // ENRICO_GCODE_PREVIEW
|
||||
//############################################################################################################
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
|
||||
Reference in New Issue
Block a user