**new additions 9-10-11**

hi guys, big update. For those of you who could just never get the whole moving things with lerp thing, of for those who get sick of typing in the events. Math now has actions to autointerpolate over time. there are two different ways.

first is to create a value to interpolate, that you can retrieve from expressions.

The second is to interpolate object positions,rotations,and dimensions automatically over a given time. like being able to order an object to a location. there are also triggered conditions for when interpolation completes, and actions to pause and resume interpolation. using the automated interpolated value actions and expressions, you could automate anything like pv's, opacity, and color.

also, the interpolation allows you to set a speed curve control point anything from 0 to 1, 0 is ease in, 0.5 is linear, and 1 is ease out.

hope it comes in handy, have fun!!!

**new additions 9-11-11**

- added the ability to set the current value, of interpolated values, which will create the value if it doesn't exist.
- you can now access values like this: math.yourvaluename and you have not yet created the value, it will return 0
- if you do it like this: math.yourvaluename(somedefaultvalue) and you have not yet created the value, it will return your default value
- added the ability to change the total time for the interpolation on the fly, as well as the time elapsed, and interpolation curve control point
special thanks to FrenchYann and Somebody for suggestions and testing

(latest update (9-11-11 10:30am:additional bug fixes)

this will be an evergrowing plugin of math functions:

http://dl.dropbox.com/u/1013446/sharinplugs/math/plugins.rar

AngleLerp(a,b,t)

is like lerp(a,b,t) for angles

basically you can lerp two angles, between 0 and 360 (EDIT:no longer has the limitation of having to be angles between 0 and 360), and not have to worry about crossing the 0/360 line just lerp and be happy, knowing that everything is taken care of, and your brainchildren are safe

the second one is Get T which is simply typed t

it's for helping with lerp functions, it's the opposite of lerp

if lerp is x==lerp(a,b,t)

then t==t(a,b,x)

in simpler terms, t(a,b,x) will give a value between 0 and 1 that represents how far between a and b x is.

I'll give more detailed examples later, but this one should suffice for people who already understand lerp and can do this without the t function: say you're looping between 2 and 6 and you want to set create a sprite between point a and b that starts at a and ends at b as you go through the loop evenly spaced in between you would just do

lerp(a,b,t(2,6,loopindex))

**hidden functions:**

the *intersectx*, and *intersecty* expressions

they aren't on the expression list, but they work

example cap here:

http://dl.dropbox.com/u/1013446/New%20folder%20%286%29/New%20folder/intersection.cap

these give you the point at which two lines intersect

you can do this 4 ways

specify 4 xy coordinates:

ntersectx(x1,y1,x2,y2,x3,y3,x4,y4)

intersecty(x1,y1,x2,y2,x3,y3,x4,y4)

specify 3 xy coordinates(the first two form a line, the 3rd is assumed to be on a perpendicular line):

ntersectx(x1,y1,x2,y2,x3,y3)

intersecty(x1,y1,x2,y2,x3,y3)

specify 4 objects

ntersectx("object1name","object2name","object3name","object4name")

intersecty("object1name","object2name","object3name","object4name")

specify 3 objects (the first two form a line, the 3rd is assumed to be on a perpendicular line):

ntersectx("object1name","object2name","object3name")

intersecty("object1name","object2name","object3name")

all 4 methods are available in the example cap, just toggle them on and off