Rotates the vertices of the triangle around one point (by default, b), returning as a new object.

let triangle = Triangles.fromPoints([a, b, c]);
triangle = Triangles.rotateByVertex(triangle, Math.Pi, `a`);
  • Parameters

    • triangle: Triangle

      Triangle

    • amountRadian: number

      Angle to rotate by

    • vertex: "a" | "b" | "c" = ...

      Name of vertex: a, b or c.

    Returns Triangle

    A new triangle