Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,21 @@
var cube:Function = function(x) {
return Math.pow(x, 3);
};
var cuberoot:Function = function(x) {
return Math.pow(x, 1/3);
};
function compose(f:Function, g:Function):Function {
return function(x:Number) {return f(g(x));};
}
var functions:Array = [Math.cos, Math.tan, cube];
var inverse:Array = [Math.acos, Math.atan, cuberoot];
function test() {
for (var i:uint = 0; i < functions.length; i++) {
// Applying the composition to 0.5
trace(compose(functions[i], inverse[i])(0.5));
}
}
test();