Difference between revisions of "BezierCurve:evaluate"

(Created page with "{{newin|0.9.0|090|type=function}} Evaluate Bézier curve with parameter t. The parameter must be between 0 and 1 (inclusive). This function can be used to move objects along...")
 
m (Metadatafoo)
Line 1: Line 1:
 
{{newin|[[0.9.0]]|090|type=function}}
 
{{newin|[[0.9.0]]|090|type=function}}
Evaluate Bézier curve with parameter t. The parameter must be between 0 and 1 (inclusive).
+
Evaluate Bézier curve at parameter t. The parameter must be between 0 and 1 (inclusive).
  
 
This function can be used to move objects along paths or tween parameters. However it should not be used to render the curve, see [[BezierCurve:render]] for that purpose.
 
This function can be used to move objects along paths or tween parameters. However it should not be used to render the curve, see [[BezierCurve:render]] for that purpose.
Line 19: Line 19:
 
* [[love.math]]
 
* [[love.math]]
 
[[Category:Functions]]
 
[[Category:Functions]]
{{#set:Description=Get coordinates of the i-th control point.}}
+
{{#set:Description=Evaluate Bézier curve at parameter t.}}
 
== Other Languages ==
 
== Other Languages ==
{{i18n|RandomGenerator:getState}}
+
{{i18n|BezierCurve:eval}}

Revision as of 12:28, 21 August 2013

Available since LÖVE 0.9.0
This function is not supported in earlier versions.

Evaluate Bézier curve at parameter t. The parameter must be between 0 and 1 (inclusive).

This function can be used to move objects along paths or tween parameters. However it should not be used to render the curve, see BezierCurve:render for that purpose.

Function

Synopsis

x,y = BezierCurve:eval(t)

Arguments

number t
Where to evaluate the curve.

Returns

number x
x coordinate of the curve at parameter t.
number y
y coordinate of the curve at parameter t.

See Also

Other Languages