mirror of
https://github.com/raysan5/raygui.git
synced 2026-01-31 19:29:19 -05:00
missleading doc in gui_curve_edit (#269)
EvalGuiCurve doesn't return normalized y.
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
* #include "gui_curve_edit.h"
|
* #include "gui_curve_edit.h"
|
||||||
*
|
*
|
||||||
* INIT: GuiCurveEditState state = InitCurveEdit();
|
* 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);
|
* DRAW: BeginScissorMode(bounds.x,bounds.y,bounds.width,bounds.height);
|
||||||
* GuiCurveEdit(&state, bounds, pointSize);
|
* GuiCurveEdit(&state, bounds, pointSize);
|
||||||
* EndScissorMode();
|
* EndScissorMode();
|
||||||
@ -96,7 +96,7 @@ GuiCurveEditState InitGuiCurveEdit();
|
|||||||
void GuiCurveEdit(GuiCurveEditState *state, Rectangle bounds);
|
void GuiCurveEdit(GuiCurveEditState *state, Rectangle bounds);
|
||||||
|
|
||||||
// 1D Interpolation
|
// 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]
|
// t must be normalized [0.f, 1.f]
|
||||||
float EvalGuiCurve(GuiCurveEditState *state, float t);
|
float EvalGuiCurve(GuiCurveEditState *state, float t);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user