Commits

Alex Szpakowski  committed e05edf0

Renamed BezierCurve:eval to BezierCurve:evaluate (resolves issue #722)

  • Participants
  • Parent commits abbb5b0

Comments (0)

Files changed (4)

File src/modules/math/BezierCurve.cpp

 		controlPoints[i] = (controlPoints[i] - center) * s + center;
 }
 
-Vector BezierCurve::eval(double t) const
+Vector BezierCurve::evaluate(double t) const
 {
 	if (t < 0 || t > 1)
 		throw Exception("Invalid evaluation parameter: must be between 0 and 1");

File src/modules/math/BezierCurve.h

 	 * Evaluates the curve at time t.
 	 * @param t Curve parameter, must satisfy 0 <= t <= 1.
 	 **/
-	Vector eval(double t) const;
+	Vector evaluate(double t) const;
 
 	/**
 	 * Renders the curve by subdivision.

File src/modules/math/wrap_BezierCurve.cpp

 	return 0;
 }
 
-int w_BezierCurve_eval(lua_State *L)
+int w_BezierCurve_evaluate(lua_State *L)
 {
 	BezierCurve *curve = luax_checkbeziercurve(L, 1);
 	double t = luaL_checknumber(L, 2);
 
 	EXCEPT_GUARD(
-		Vector v = curve->eval(t);
+		Vector v = curve->evaluate(t);
 		lua_pushnumber(L, v.x);
 		lua_pushnumber(L, v.y);
 	)
 	{"translate", w_BezierCurve_translate},
 	{"rotate", w_BezierCurve_rotate},
 	{"scale", w_BezierCurve_scale},
-	{"eval", w_BezierCurve_eval},
+	{"evaluate", w_BezierCurve_evaluate},
 	{"render", w_BezierCurve_render},
 	{ 0, 0 }
 };

File src/modules/math/wrap_BezierCurve.h

 int w_BezierCurve_translate(lua_State *L);
 int w_BezierCurve_rotate(lua_State *L);
 int w_BezierCurve_scale(lua_State *L);
-int w_BezierCurve_eval(lua_State *L);
+int w_BezierCurve_evaluate(lua_State *L);
 int w_BezierCurve_render(lua_State *L);
 extern "C" int luaopen_beziercurve(lua_State *L);