function intersectTriangle(ray, triangle) {
  const EPSILON = 0.000001;
  
  let edge1 = triangle.v2.clone().sub(triangle.v1);
  let edge2 = triangle.v3.clone().sub(triangle.v1);
  let h = ray.direction.clone().cross(edge2);
  let a = edge1.dot(h);
  if (a > -EPSILON && a < EPSILON) {
    return false;
  }
  let f = 1.0 / a;
  let s = ray.origin.clone().sub(triangle.v1);
  let u = f * s.dot(h);
  if (u < 0.0 || u > 1.0) {
    return false;
  }
  let q = s.cross(edge1);
  let v = f * ray.direction.dot(q);
  if (v < 0.0 || u + v > 1.0) {
    return false;
  }
  let t = f * edge2.dot(q);
  if (t > EPSILON) {
    return t;
  } else {
    return false;
  }
}
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence