Class Flattener2d.MaxAngle

java.lang.Object
org.djutils.draw.curve.Flattener2d.MaxAngle
All Implemented Interfaces:
Flattener<Flattener2d,Curve2d,PolyLine2d,Point2d,Double>, Flattener2d
Enclosing interface:
Flattener2d

public static class Flattener2d.MaxAngle extends Object implements Flattener2d
Flattener that limits the angle difference between the Curve2d and the PolyLine2d.
  • Constructor Details

    • MaxAngle

      public MaxAngle(double maxAngle)
      Flattener that limits the angle difference between the Curve2d and the PolyLine2d.
      Parameters:
      maxAngle - maximum angle.
      Throws:
      ArithmeticException - when maxAngle is NaN
      IllegalArgumentException - when maxAngle ≤ 0.0
  • Method Details

    • flatten

      public PolyLine2d flatten(Curve2d curve)
      Description copied from interface: Flattener2d
      Flatten a Curve2d into a PolyLine2d.
      Specified by:
      flatten in interface Flattener2d
      Parameters:
      curve - the curve
      Returns:
      flattened line