mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/shared] CurveViewCursor: cursor.m_x can reach infinity by t can't
and can't be undefined either
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "curve_view_cursor.h"
|
||||
#include <assert.h>
|
||||
#include <cmath>
|
||||
|
||||
namespace Shared {
|
||||
@@ -6,8 +7,9 @@ namespace Shared {
|
||||
CurveViewCursor::CurveViewCursor() : m_t(NAN), m_x(NAN), m_y(NAN) {}
|
||||
|
||||
void CurveViewCursor::moveTo(double t, double x, double y) {
|
||||
assert(!std::isnan(t));
|
||||
m_t = clipped(t, false);
|
||||
m_x = clipped(x, false); //TODO LEA ?
|
||||
m_x = clipped(x, true);
|
||||
m_y = clipped(y, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user