From 5d7bc6b70adc195ccf3b556a23a1e2103f88ec7a Mon Sep 17 00:00:00 2001
From: Pierre Jaffuer
Date: Mon, 10 Apr 2023 00:41:32 +0400
Subject: [PATCH] missleading doc in gui_curve_edit (#269)
EvalGuiCurve doesn't return normalized y.
---
examples/animation_curve/gui_curve_edit.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/animation_curve/gui_curve_edit.h b/examples/animation_curve/gui_curve_edit.h
index 0a726f1..90f60b0 100644
--- a/examples/animation_curve/gui_curve_edit.h
+++ b/examples/animation_curve/gui_curve_edit.h
@@ -7,7 +7,7 @@
* #include "gui_curve_edit.h"
*
* INIT: GuiCurveEditState state = InitCurveEdit();
-* EVALUATE: float y = state.start + (state.end-state.start) * EvalGuiCurve(&state, t); // 0 <= t <= 1
+* EVALUATE: float y = EvalGuiCurve(&state, t); // 0 <= t <= 1
* DRAW: BeginScissorMode(bounds.x,bounds.y,bounds.width,bounds.height);
* GuiCurveEdit(&state, bounds, pointSize);
* EndScissorMode();
@@ -96,7 +96,7 @@ GuiCurveEditState InitGuiCurveEdit();
void GuiCurveEdit(GuiCurveEditState *state, Rectangle bounds);
// 1D Interpolation
-// Returns the normalized y value of the curve at x = t
+// Returns the y value (in [start, end]) of the curve at x = t
// t must be normalized [0.f, 1.f]
float EvalGuiCurve(GuiCurveEditState *state, float t);