
--- author:???		current maintainer:mcb		v1.0
-- Berechnet eine Position auf einer Kreisbahn.
function GetCirclePosition(_position, _range, _angle)
    assert(type(_position) == "table")
    local angle = math.rad(_angle)
    assert(type(angle) == "number")
    assert(type(_range) == "number")
    return {
        X = _position.X + math.cos(angle) * _range,
        Y = _position.Y + math.sin(angle) * _range  
    }
end

-- von Simi

function get_something(x, y, radius, start_angle, end_angle, n)
    local delta = (end_angle - start_angle) / n;
    local t = {};
    for i = 1, n do
        local angle = math.rad(start_angle + delta * n);
        local offx = math.cos(angle) * radius;
        local offy = math.sin(angle) * radius;
        table.insert(t, {X=x+offx,Y=y+offy});
    end;
    return t;
end;