alongValue method
Calculates the position along an axis for a given size.
Parameters:
axis(Axis, required): The axis to calculate along.size(double, required): The total size along the axis.
Returns: The calculated position.
Implementation
double alongValue(Axis axis, double size) {
double center = size / 2;
return center + resolveValue(axis) * center;
}