Browse Source

Use isfinite from C instead of std::isfinite from C++

pull/1639/head
Andrew Belt 7 years ago
parent
commit
6dcf3e4b57
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      include/util/math.hpp
  2. +1
    -1
      src/app/Knob.cpp
  3. +1
    -1
      src/app/SVGKnob.cpp

+ 1
- 1
include/util/math.hpp View File

@@ -168,7 +168,7 @@ struct Vec {
return x == 0.0f && y == 0.0f;
}
bool isFinite() {
return std::isfinite(x) && std::isfinite(y);
return isfinite(x) && isfinite(y);
}
Vec clamp(Rect bound);
};


+ 1
- 1
src/app/Knob.cpp View File

@@ -19,7 +19,7 @@ void Knob::onDragStart(EventDragStart &e) {
void Knob::onDragMove(EventDragMove &e) {
float range = maxValue - minValue;
float delta = KNOB_SENSITIVITY * -e.mouseRel.y * speed;
if (std::isfinite(range))
if (isfinite(range))
delta *= range;

// Drag slower if Mod is held


+ 1
- 1
src/app/SVGKnob.cpp View File

@@ -24,7 +24,7 @@ void SVGKnob::step() {
if (dirty) {
tw->box.size = box.size;
float angle = 0.0;
if (std::isfinite(minValue) && std::isfinite(maxValue))
if (isfinite(minValue) && isfinite(maxValue))
angle = rescale(value, minValue, maxValue, minAngle, maxAngle);
tw->identity();
// Scale SVG to box


Loading…
Cancel
Save