define(["require", "exports", "./helper-common"], function (require, exports, helper_common_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function linear(currentTime, startValue, endValue, duration) {
return -endValue * Math.cos(currentTime / duration * (Math.PI / 2)) + endValue + startValue;
}
exports.linear = linear;
function getCompleteArc(center, start, end, radius, innerRadius, checkMinValue) {
end -= helper_common_1.isCompleteAngle(start, end) && !checkMinValue ? 0.0001 : 0;
var degree = helper_common_1.getDegree(start, end);
return getCompletePath(center, helper_common_1.getLocationFromAngle(start, radius, center), helper_common_1.getLocationFromAngle(end, radius, center), radius, helper_common_1.getLocationFromAngle(start, innerRadius, center), helper_common_1.getLocationFromAngle(end, innerRadius, center), innerRadius, (degree < 180) ? 0 : 1);
}
exports.getCompleteArc = getCompleteArc;
function getCompletePath(center, start, end, radius, innerStart, innerEnd, innerRadius, clockWise) {
return 'M ' + start.x + ' ' + start.y + ' A ' + radius + ' ' + radius + ' 0 ' + clockWise +
' 1 ' + end.x + ' ' + end.y + ' L ' + innerEnd.x + ' ' + innerEnd.y + ' A ' + innerRadius +
' ' + innerRadius + ' 0 ' + clockWise + ',0 ' + innerStart.x + ' ' + innerStart.y + ' Z';
}
exports.getCompletePath = getCompletePath;
});
|