Class Ellipse2dJNI

java.lang.Object
org.wpilib.math.jni.WPIMathJNI
org.wpilib.math.jni.Ellipse2dJNI

public final class Ellipse2dJNI extends WPIMathJNI
Ellipse2d JNI.
  • Method Details

    • nearest

      public static void nearest(double centerX, double centerY, double centerHeading, double xSemiAxis, double ySemiAxis, double pointX, double pointY, double[] nearestPoint)
      Returns the nearest point that is contained within the ellipse.

      Constructs an Ellipse2d object and runs its nearest() method.

      Parameters:
      centerX - The x coordinate of the center of the ellipse in meters.
      centerY - The y coordinate of the center of the ellipse in meters.
      centerHeading - The ellipse's rotation in radians.
      xSemiAxis - The x semi-axis in meters.
      ySemiAxis - The y semi-axis in meters.
      pointX - The x coordinate of the point that this will find the nearest point to.
      pointY - The y coordinate of the point that this will find the nearest point to.
      nearestPoint - Array to store nearest point into.