ixfx
    Preparing search index...
    • Returns a triangle that is rotated by angleRad. By default it rotates around its center but an arbitrary origin point can be provided.

      let triangle = Triangles.fromPoints([a, b, c]);

      // Rotate triangle by 5 degrees
      triangle = Triangles.rotate(triangle, degreeToRadian(5));

      // Rotate by 90 degrees
      triangle = Triangles.rotate(triangle, Math.PI / 2);

      Parameters

      • triangle: Triangle

        Triangle to rotate

      • OptionalamountRadian: number

        Angle in radians to rotate by

      • Optionalorigin: Geometry.Point

        Point to rotate around. If undefined, middle of triangle will be used

      Returns Triangle

      A new triangle