1/*! Bezier Easing ~ Sean Catchpole - Copyright 2010 MIT/GPL */ 2(function($){ if(!$){ return } 3 4 var midpoint = function(t,a,b){ 5 return { x: t*(b.x-a.x) + a.x 6 , y: t*(b.y-a.y) + a.y } 7 }; 8 9 var bezier = function(t,p){ 10 p=p.slice(); 11 p.unshift({x:0,y:0}); 12 p.push({x:1,y:1}); 13 var i, n=p.length; 14 while( n-->1 ){ 15 for( i=0; i<n; i++ ){ 16 p[i] = midpoint( t, p[i], p[i+1] ); 17 } 18 } 19 return p[0]; 20 }; 21 22 $.bezier = function(){ 23 var args = [].slice.call(arguments) 24 , list=[], p, last=0, N=$.bezier.samples, i=N; 25 while( i-- ){ 26 p = bezier(i/N,args); 27 list[Math.round(p.x*N)] = p.y; 28 } 29 for( i=0; i<=N; i++ ){ 30 if( list[i]==null ){ list[i]=last; } 31 else{ last=list[i]; } 32 } 33 return function(t,n,a,b){ 34 n = Math.floor(t*N); 35 n = list[n]+(list[n+1]-list[n])*(t*N-n); 36 return n*(b-a) + a; 37 }; 38 }; 39 $.bezier.samples = 100; 40 41 $.easing["ease"] = $.bezier( {x:0.25,y:0.1}, {x:0.25,y:1} ); 42 $.easing["ease-in"] = $.bezier( {x:0.42,y:0}, {x:1,y:1} ); 43 $.easing["ease-out"] = $.bezier( {x:0,y:0}, {x:0.58,y:1} ); 44 $.easing["ease-in-out"] = $.bezier( {x:0.42,y:0}, {x:0.58,y:1} ); 45 46})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.