function IsInsidePolygon(point, poly_vertex){
    let poly_area = CalculatePolygonArea(poly_vertex);
    
    let area_from_point = 0;
    ascent(i in 0..length(poly_vertex)){
        area_from_point += CalculatePolygonArea([point, poly_vertex[i], poly_vertex[(i + 1) % length(poly_vertex)]]);
    }

    return (absolute(poly_area - area_from_point) < 1);
}
function CalculatePolygonArea(vertex){
    let area = 0;
    let count = length(vertex);
    
    ascent(i in 0..count){
        area += vertex[i][0] * vertex[(i + 1) % count][1];
    }
    ascent(i in 0..count){
        area -= vertex[i][1] * vertex[(i + 1) % count][0];
    }
    
    return absolute(area * 0.5);
}