mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 16:51:21 -06:00
GCode Preview - Code cleanup
This commit is contained in:
parent
c63e6b74fa
commit
a417cf955d
24 changed files with 12 additions and 987 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue