2 * jQuery UI Effects 1.8.7
4 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
5 * Dual licensed under the MIT or GPL Version 2 licenses.
6 * http://jquery.org/license
8 * http://docs.jquery.com/UI/Effects/
10 ;jQuery
.effects
|| (function($, undefined) {
16 /******************************************************************************/
17 /****************************** COLOR ANIMATIONS ******************************/
18 /******************************************************************************/
20 // override the animation for color styles
21 $.each(['backgroundColor', 'borderBottomColor', 'borderLeftColor',
22 'borderRightColor', 'borderTopColor', 'borderColor', 'color', 'outlineColor'],
24 $.fx
.step
[attr
] = function(fx
) {
26 fx
.start
= getColor(fx
.elem
, attr
);
27 fx
.end
= getRGB(fx
.end
);
31 fx
.elem
.style
[attr
] = 'rgb(' +
32 Math
.max(Math
.min(parseInt((fx
.pos
* (fx
.end
[0] - fx
.start
[0])) + fx
.start
[0], 10), 255), 0) + ',' +
33 Math
.max(Math
.min(parseInt((fx
.pos
* (fx
.end
[1] - fx
.start
[1])) + fx
.start
[1], 10), 255), 0) + ',' +
34 Math
.max(Math
.min(parseInt((fx
.pos
* (fx
.end
[2] - fx
.start
[2])) + fx
.start
[2], 10), 255), 0) + ')';
38 // Color Conversion functions from highlightFade
39 // By Blair Mitchelmore
40 // http://jquery.offput.ca/highlightFade/
42 // Parse strings looking for color tuples [255,255,255]
43 function getRGB(color
) {
46 // Check if we're already dealing with an array of colors
47 if ( color
&& color
.constructor == Array
&& color
.length
== 3 )
50 // Look for rgb(num,num,num)
51 if (result
= /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color
))
52 return [parseInt(result
[1],10), parseInt(result
[2],10), parseInt(result
[3],10)];
54 // Look for rgb(num%,num%,num%)
55 if (result
= /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color
))
56 return [parseFloat(result
[1])*2.55, parseFloat(result
[2])*2.55, parseFloat(result
[3])*2.55];
59 if (result
= /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color
))
60 return [parseInt(result
[1],16), parseInt(result
[2],16), parseInt(result
[3],16)];
63 if (result
= /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color
))
64 return [parseInt(result
[1]+result
[1],16), parseInt(result
[2]+result
[2],16), parseInt(result
[3]+result
[3],16)];
66 // Look for rgba(0, 0, 0, 0) == transparent in Safari 3
67 if (result
= /rgba\(0, 0, 0, 0\)/.exec(color
))
68 return colors
['transparent'];
70 // Otherwise, we're most likely dealing with a named color
71 return colors
[$.trim(color
).toLowerCase()];
74 function getColor(elem
, attr
) {
78 color
= $.curCSS(elem
, attr
);
80 // Keep going until we find an element that has color, or we hit the body
81 if ( color
!= '' && color
!= 'transparent' || $.nodeName(elem
, "body") )
84 attr
= "backgroundColor";
85 } while ( elem
= elem
.parentNode
);
90 // Some named colors to work with
91 // From Interface by Stefan Petre
92 // http://interface.eyecon.ro/
103 darkcyan
:[0,139,139],
104 darkgrey
:[169,169,169],
106 darkkhaki
:[189,183,107],
107 darkmagenta
:[139,0,139],
108 darkolivegreen
:[85,107,47],
109 darkorange
:[255,140,0],
110 darkorchid
:[153,50,204],
112 darksalmon
:[233,150,122],
113 darkviolet
:[148,0,211],
119 lightblue
:[173,216,230],
120 lightcyan
:[224,255,255],
121 lightgreen
:[144,238,144],
122 lightgrey
:[211,211,211],
123 lightpink
:[255,182,193],
124 lightyellow
:[255,255,224],
135 silver
:[192,192,192],
138 transparent
: [255,255,255]
143 /******************************************************************************/
144 /****************************** CLASS ANIMATIONS ******************************/
145 /******************************************************************************/
147 var classAnimationActions
= ['add', 'remove', 'toggle'],
160 function getElementStyles() {
161 var style
= document
.defaultView
162 ? document
.defaultView
.getComputedStyle(this, null)
168 // webkit enumerates style porperties
169 if (style
&& style
.length
&& style
[0] && style
[style
[0]]) {
170 var len
= style
.length
;
173 if (typeof style
[key
] == 'string') {
174 camelCase
= key
.replace(/\-(\w)/g, function(all
, letter
){
175 return letter
.toUpperCase();
177 newStyle
[camelCase
] = style
[key
];
182 if (typeof style
[key
] === 'string') {
183 newStyle
[key
] = style
[key
];
191 function filterStyles(styles
) {
193 for (name
in styles
) {
194 value
= styles
[name
];
196 // ignore null and undefined values
198 // ignore functions (when does this occur?)
199 $.isFunction(value
) ||
200 // shorthand styles that need to be expanded
201 name
in shorthandStyles
||
202 // ignore scrollbars (break in IE)
203 (/scrollbar/).test(name
) ||
205 // only colors or values that can be converted to numbers
206 (!(/color/i).test(name
) && isNaN(parseFloat(value
)))
215 function styleDifference(oldStyle
, newStyle
) {
216 var diff
= { _
: 0 }, // http://dev.jquery.com/ticket/5459
219 for (name
in newStyle
) {
220 if (oldStyle
[name
] != newStyle
[name
]) {
221 diff
[name
] = newStyle
[name
];
228 $.effects
.animateClass = function(value
, duration
, easing
, callback
) {
229 if ($.isFunction(easing
)) {
234 return this.each(function() {
235 $.queue(this, 'fx', function() {
237 originalStyleAttr
= that
.attr('style') || ' ',
238 originalStyle
= filterStyles(getElementStyles
.call(this)),
240 className
= that
.attr('className');
242 $.each(classAnimationActions
, function(i
, action
) {
244 that
[action
+ 'Class'](value
[action
]);
247 newStyle
= filterStyles(getElementStyles
.call(this));
248 that
.attr('className', className
);
250 that
.animate(styleDifference(originalStyle
, newStyle
), duration
, easing
, function() {
251 $.each(classAnimationActions
, function(i
, action
) {
252 if (value
[action
]) { that
[action
+ 'Class'](value
[action
]); }
254 // work around bug in IE by clearing the cssText before setting it
255 if (typeof that
.attr('style') == 'object') {
256 that
.attr('style').cssText
= '';
257 that
.attr('style').cssText
= originalStyleAttr
;
259 that
.attr('style', originalStyleAttr
);
261 if (callback
) { callback
.apply(this, arguments
); }
264 // $.animate adds a function to the end of the queue
265 // but we want it at the front
266 var queue
= $.queue(this),
267 anim
= queue
.splice(queue
.length
- 1, 1)[0];
268 queue
.splice(1, 0, anim
);
275 _addClass
: $.fn
.addClass
,
276 addClass: function(classNames
, speed
, easing
, callback
) {
277 return speed
? $.effects
.animateClass
.apply(this, [{ add
: classNames
},speed
,easing
,callback
]) : this._addClass(classNames
);
280 _removeClass
: $.fn
.removeClass
,
281 removeClass: function(classNames
,speed
,easing
,callback
) {
282 return speed
? $.effects
.animateClass
.apply(this, [{ remove
: classNames
},speed
,easing
,callback
]) : this._removeClass(classNames
);
285 _toggleClass
: $.fn
.toggleClass
,
286 toggleClass: function(classNames
, force
, speed
, easing
, callback
) {
287 if ( typeof force
== "boolean" || force
=== undefined ) {
289 // without speed parameter;
290 return this._toggleClass(classNames
, force
);
292 return $.effects
.animateClass
.apply(this, [(force
?{add
:classNames
}:{remove
:classNames
}),speed
,easing
,callback
]);
295 // without switch parameter;
296 return $.effects
.animateClass
.apply(this, [{ toggle
: classNames
},force
,speed
,easing
]);
300 switchClass: function(remove
,add
,speed
,easing
,callback
) {
301 return $.effects
.animateClass
.apply(this, [{ add
: add
, remove
: remove
},speed
,easing
,callback
]);
307 /******************************************************************************/
308 /*********************************** EFFECTS **********************************/
309 /******************************************************************************/
311 $.extend($.effects
, {
314 // Saves a set of properties in a data storage
315 save: function(element
, set) {
316 for(var i
=0; i
< set.length
; i
++) {
317 if(set[i
] !== null) element
.data("ec.storage."+set[i
], element
[0].style
[set[i
]]);
321 // Restores a set of previously saved properties from a data storage
322 restore: function(element
, set) {
323 for(var i
=0; i
< set.length
; i
++) {
324 if(set[i
] !== null) element
.css(set[i
], element
.data("ec.storage."+set[i
]));
328 setMode: function(el
, mode
) {
329 if (mode
== 'toggle') mode
= el
.is(':hidden') ? 'show' : 'hide'; // Set for toggle
333 getBaseline: function(origin
, original
) { // Translates a [top,left] array into a baseline value
334 // this should be a little more flexible in the future to handle a string & hash
337 case 'top': y
= 0; break;
338 case 'middle': y
= 0.5; break;
339 case 'bottom': y
= 1; break;
340 default: y
= origin
[0] / original
.height
;
343 case 'left': x
= 0; break;
344 case 'center': x
= 0.5; break;
345 case 'right': x
= 1; break;
346 default: x
= origin
[1] / original
.width
;
351 // Wraps the element around a wrapper that copies position properties
352 createWrapper: function(element
) {
354 // if the element is already wrapped, return it
355 if (element
.parent().is('.ui-effects-wrapper')) {
356 return element
.parent();
361 width
: element
.outerWidth(true),
362 height
: element
.outerHeight(true),
363 'float': element
.css('float')
365 wrapper
= $('<div></div>')
366 .addClass('ui-effects-wrapper')
369 background
: 'transparent',
375 element
.wrap(wrapper
);
376 wrapper
= element
.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
378 // transfer positioning properties to the wrapper
379 if (element
.css('position') == 'static') {
380 wrapper
.css({ position
: 'relative' });
381 element
.css({ position
: 'relative' });
384 position
: element
.css('position'),
385 zIndex
: element
.css('z-index')
387 $.each(['top', 'left', 'bottom', 'right'], function(i
, pos
) {
388 props
[pos
] = element
.css(pos
);
389 if (isNaN(parseInt(props
[pos
], 10))) {
393 element
.css({position
: 'relative', top
: 0, left
: 0 });
396 return wrapper
.css(props
).show();
399 removeWrapper: function(element
) {
400 if (element
.parent().is('.ui-effects-wrapper'))
401 return element
.parent().replaceWith(element
);
405 setTransition: function(element
, list
, factor
, value
) {
407 $.each(list
, function(i
, x
){
408 unit
= element
.cssUnit(x
);
409 if (unit
[0] > 0) value
[x
] = unit
[0] * factor
+ unit
[1];
416 function _normalizeArguments(effect
, options
, speed
, callback
) {
417 // shift params for method overloading
418 if (typeof effect
== 'object') {
422 effect
= options
.effect
;
424 if ($.isFunction(options
)) {
429 if (typeof options
== 'number' || $.fx
.speeds
[options
]) {
434 if ($.isFunction(speed
)) {
439 options
= options
|| {};
441 speed
= speed
|| options
.duration
;
442 speed
= $.fx
.off
? 0 : typeof speed
== 'number'
443 ? speed
: speed
in $.fx
.speeds
? $.fx
.speeds
[speed
] : $.fx
.speeds
._default
;
445 callback
= callback
|| options
.complete
;
447 return [effect
, options
, speed
, callback
];
450 function standardSpeed( speed
) {
451 // valid standard speeds
452 if ( !speed
|| typeof speed
=== "number" || $.fx
.speeds
[ speed
] ) {
456 // invalid strings - treat as "normal" speed
457 if ( typeof speed
=== "string" && !$.effects
[ speed
] ) {
465 effect: function(effect
, options
, speed
, callback
) {
466 var args
= _normalizeArguments
.apply(this, arguments
),
467 // TODO: make effects take actual parameters instead of a hash
473 mode
= args2
.options
.mode
,
474 effectMethod
= $.effects
[effect
];
476 if ( $.fx
.off
|| !effectMethod
) {
477 // delegate to the original method (e.g., .show()) if possible
479 return this[ mode
]( args2
.duration
, args2
.callback
);
481 return this.each(function() {
482 if ( args2
.callback
) {
483 args2
.callback
.call( this );
489 return effectMethod
.call(this, args2
);
493 show: function(speed
) {
494 if ( standardSpeed( speed
) ) {
495 return this._show
.apply(this, arguments
);
497 var args
= _normalizeArguments
.apply(this, arguments
);
498 args
[1].mode
= 'show';
499 return this.effect
.apply(this, args
);
504 hide: function(speed
) {
505 if ( standardSpeed( speed
) ) {
506 return this._hide
.apply(this, arguments
);
508 var args
= _normalizeArguments
.apply(this, arguments
);
509 args
[1].mode
= 'hide';
510 return this.effect
.apply(this, args
);
514 // jQuery core overloads toggle and creates _toggle
515 __toggle
: $.fn
.toggle
,
516 toggle: function(speed
) {
517 if ( standardSpeed( speed
) || typeof speed
=== "boolean" || $.isFunction( speed
) ) {
518 return this.__toggle
.apply(this, arguments
);
520 var args
= _normalizeArguments
.apply(this, arguments
);
521 args
[1].mode
= 'toggle';
522 return this.effect
.apply(this, args
);
527 cssUnit: function(key
) {
528 var style
= this.css(key
), val
= [];
529 $.each( ['em','px','%','pt'], function(i
, unit
){
530 if(style
.indexOf(unit
) > 0)
531 val
= [parseFloat(style
), unit
];
539 /******************************************************************************/
540 /*********************************** EASING ***********************************/
541 /******************************************************************************/
544 * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
546 * Uses the built in easing capabilities added In jQuery 1.1
547 * to offer multiple easing options
549 * TERMS OF USE - jQuery Easing
551 * Open source under the BSD License.
553 * Copyright 2008 George McGinley Smith
554 * All rights reserved.
556 * Redistribution and use in source and binary forms, with or without modification,
557 * are permitted provided that the following conditions are met:
559 * Redistributions of source code must retain the above copyright notice, this list of
560 * conditions and the following disclaimer.
561 * Redistributions in binary form must reproduce the above copyright notice, this list
562 * of conditions and the following disclaimer in the documentation and/or other materials
563 * provided with the distribution.
565 * Neither the name of the author nor the names of contributors may be used to endorse
566 * or promote products derived from this software without specific prior written permission.
568 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
569 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
570 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
571 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
572 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
573 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
574 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
575 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
576 * OF THE POSSIBILITY OF SUCH DAMAGE.
580 // t: current time, b: begInnIng value, c: change In value, d: duration
581 $.easing
.jswing
= $.easing
.swing
;
586 swing: function (x
, t
, b
, c
, d
) {
587 //alert($.easing.default);
588 return $.easing
[$.easing
.def
](x
, t
, b
, c
, d
);
590 easeInQuad: function (x
, t
, b
, c
, d
) {
591 return c
*(t
/=d
)*t
+ b
;
593 easeOutQuad: function (x
, t
, b
, c
, d
) {
594 return -c
*(t
/=d
)*(t
-2) + b
;
596 easeInOutQuad: function (x
, t
, b
, c
, d
) {
597 if ((t
/=d/2) < 1) return c
/2*t
*t
+ b
;
598 return -c
/2 * ((--t
)*(t
-2) - 1) + b
;
600 easeInCubic: function (x
, t
, b
, c
, d
) {
601 return c
*(t
/=d
)*t
*t
+ b
;
603 easeOutCubic: function (x
, t
, b
, c
, d
) {
604 return c
*((t
=t
/d
-1)*t
*t
+ 1) + b
;
606 easeInOutCubic: function (x
, t
, b
, c
, d
) {
607 if ((t
/=d/2) < 1) return c
/2*t
*t
*t
+ b
;
608 return c
/2*((t
-=2)*t
*t
+ 2) + b
;
610 easeInQuart: function (x
, t
, b
, c
, d
) {
611 return c
*(t
/=d
)*t
*t
*t
+ b
;
613 easeOutQuart: function (x
, t
, b
, c
, d
) {
614 return -c
* ((t
=t
/d
-1)*t
*t
*t
- 1) + b
;
616 easeInOutQuart: function (x
, t
, b
, c
, d
) {
617 if ((t
/=d/2) < 1) return c
/2*t
*t
*t
*t
+ b
;
618 return -c
/2 * ((t
-=2)*t
*t
*t
- 2) + b
;
620 easeInQuint: function (x
, t
, b
, c
, d
) {
621 return c
*(t
/=d
)*t
*t
*t
*t
+ b
;
623 easeOutQuint: function (x
, t
, b
, c
, d
) {
624 return c
*((t
=t
/d
-1)*t
*t
*t
*t
+ 1) + b
;
626 easeInOutQuint: function (x
, t
, b
, c
, d
) {
627 if ((t
/=d/2) < 1) return c
/2*t
*t
*t
*t
*t
+ b
;
628 return c
/2*((t
-=2)*t
*t
*t
*t
+ 2) + b
;
630 easeInSine: function (x
, t
, b
, c
, d
) {
631 return -c
* Math
.cos(t
/d * (Math.PI/2)) + c
+ b
;
633 easeOutSine: function (x
, t
, b
, c
, d
) {
634 return c
* Math
.sin(t
/d * (Math.PI/2)) + b
;
636 easeInOutSine: function (x
, t
, b
, c
, d
) {
637 return -c
/2 * (Math.cos(Math.PI*t/d) - 1) + b
;
639 easeInExpo: function (x
, t
, b
, c
, d
) {
640 return (t
==0) ? b
: c
* Math
.pow(2, 10 * (t
/d
- 1)) + b
;
642 easeOutExpo: function (x
, t
, b
, c
, d
) {
643 return (t
==d
) ? b
+c
: c
* (-Math
.pow(2, -10 * t
/d
) + 1) + b
;
645 easeInOutExpo: function (x
, t
, b
, c
, d
) {
647 if (t
==d
) return b
+c
;
648 if ((t
/=d/2) < 1) return c
/2 * Math
.pow(2, 10 * (t
- 1)) + b
;
649 return c
/2 * (-Math
.pow(2, -10 * --t
) + 2) + b
;
651 easeInCirc: function (x
, t
, b
, c
, d
) {
652 return -c
* (Math
.sqrt(1 - (t
/=d
)*t
) - 1) + b
;
654 easeOutCirc: function (x
, t
, b
, c
, d
) {
655 return c
* Math
.sqrt(1 - (t
=t
/d
-1)*t
) + b
;
657 easeInOutCirc: function (x
, t
, b
, c
, d
) {
658 if ((t
/=d/2) < 1) return -c
/2 * (Math
.sqrt(1 - t
*t
) - 1) + b
;
659 return c
/2 * (Math
.sqrt(1 - (t
-=2)*t
) + 1) + b
;
661 easeInElastic: function (x
, t
, b
, c
, d
) {
662 var s
=1.70158;var p
=0;var a
=c
;
663 if (t
==0) return b
; if ((t
/=d
)==1) return b
+c
; if (!p
) p
=d
*.3;
664 if (a
< Math
.abs(c
)) { a
=c
; var s
=p
/4; }
665 else var s
= p
/(2*Math.PI) * Math.asin (c/a);
666 return -(a
*Math
.pow(2,10*(t
-=1)) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
)) + b
;
668 easeOutElastic: function (x
, t
, b
, c
, d
) {
669 var s
=1.70158;var p
=0;var a
=c
;
670 if (t
==0) return b
; if ((t
/=d
)==1) return b
+c
; if (!p
) p
=d
*.3;
671 if (a
< Math
.abs(c
)) { a
=c
; var s
=p
/4; }
672 else var s
= p
/(2*Math.PI) * Math.asin (c/a);
673 return a
*Math
.pow(2,-10*t
) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
) + c
+ b
;
675 easeInOutElastic: function (x
, t
, b
, c
, d
) {
676 var s
=1.70158;var p
=0;var a
=c
;
677 if (t
==0) return b
; if ((t
/=d/2)==2) return b
+c
; if (!p
) p
=d
*(.3*1.5);
678 if (a
< Math
.abs(c
)) { a
=c
; var s
=p
/4; }
679 else var s
= p
/(2*Math.PI) * Math.asin (c/a);
680 if (t
< 1) return -.5*(a
*Math
.pow(2,10*(t
-=1)) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
)) + b
;
681 return a
*Math
.pow(2,-10*(t
-=1)) * Math
.sin( (t
*d
-s
)*(2*Math
.PI
)/p
)*.5 + c
+ b
;
683 easeInBack: function (x
, t
, b
, c
, d
, s
) {
684 if (s
== undefined) s
= 1.70158;
685 return c
*(t
/=d
)*t
*((s
+1)*t
- s
) + b
;
687 easeOutBack: function (x
, t
, b
, c
, d
, s
) {
688 if (s
== undefined) s
= 1.70158;
689 return c
*((t
=t
/d
-1)*t
*((s
+1)*t
+ s
) + 1) + b
;
691 easeInOutBack: function (x
, t
, b
, c
, d
, s
) {
692 if (s
== undefined) s
= 1.70158;
693 if ((t
/=d/2) < 1) return c
/2*(t
*t
*(((s
*=(1.525))+1)*t
- s
)) + b
;
694 return c
/2*((t
-=2)*t
*(((s
*=(1.525))+1)*t
+ s
) + 2) + b
;
696 easeInBounce: function (x
, t
, b
, c
, d
) {
697 return c
- $.easing
.easeOutBounce (x
, d
-t
, 0, c
, d
) + b
;
699 easeOutBounce: function (x
, t
, b
, c
, d
) {
700 if ((t
/=d) < (1/2.75)) {
701 return c
*(7.5625*t
*t
) + b
;
702 } else if (t
< (2/2.75)) {
703 return c
*(7.5625*(t
-=(1.5/2.75))*t
+ .75) + b
;
704 } else if (t
< (2.5/2.75)) {
705 return c
*(7.5625*(t
-=(2.25/2.75))*t
+ .9375) + b
;
707 return c
*(7.5625*(t
-=(2.625/2.75))*t
+ .984375) + b
;
710 easeInOutBounce: function (x
, t
, b
, c
, d
) {
711 if (t
< d
/2) return $.easing
.easeInBounce (x
, t
*2, 0, c
, d
) * .5 + b
;
712 return $.easing
.easeOutBounce (x
, t
*2-d
, 0, c
, d
) * .5 + c
*.5 + b
;
718 * TERMS OF USE - EASING EQUATIONS
720 * Open source under the BSD License.
722 * Copyright 2001 Robert Penner
723 * All rights reserved.
725 * Redistribution and use in source and binary forms, with or without modification,
726 * are permitted provided that the following conditions are met:
728 * Redistributions of source code must retain the above copyright notice, this list of
729 * conditions and the following disclaimer.
730 * Redistributions in binary form must reproduce the above copyright notice, this list
731 * of conditions and the following disclaimer in the documentation and/or other materials
732 * provided with the distribution.
734 * Neither the name of the author nor the names of contributors may be used to endorse
735 * or promote products derived from this software without specific prior written permission.
737 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
738 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
739 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
740 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
741 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
742 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
743 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
744 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
745 * OF THE POSSIBILITY OF SUCH DAMAGE.