#ifndef PROTOTYPE1_SRC_L2_MARIE_SHAPE_GEOM_H
#define PROTOTYPE1_SRC_L2_MARIE_SHAPE_GEOM_H

#include "../../../gen/l1_5/marie/clipping.h"

void marie_clip_triang_with_triang_append_to_Vec(MarieTriangle C, MarieTriangle T, VecMarieTriangle* pile) {
    float SC = marie_surface(C.v0, C.v1, C.v2);
    if (SC < 0) {
        vec2 t = C.v0;
        C.v0 = C.v1;
        C.v1 = t;
    }
    float ST = marie_surface(T.v0, T.v1, T.v2);
    if (ST < 0) {
        vec2 t = T.v0;
        T.v0 = T.v1;
        T.v1 = t;
    }
    marie_clip_ccw_triang_with_ccw_triang_append_to_Vec(C, T, pile);
}

#endif
