Pregunta de entrevista de Xpeng Motors

How to compute iou for two triangle objects