Circular property
Implementation
static Map<ETTypes,num Function(num,[num?])> Circular = {
ETTypes.In:(amount,[power]) {
return 1 - math.sqrt(1 - amount * amount);
},
ETTypes.Out:(amount,[power]) {
return math.sqrt(1 - --amount * amount);
},
ETTypes.InOut:(amount,[power]) {
if ((amount *= 2) < 1) {
return -0.5 * (math.sqrt(1 - amount * amount) - 1);
}
return 0.5 * (math.sqrt(1 - (amount -= 2) * amount) + 1);
},
};