001// Copyright (c) FIRST and other WPILib contributors. 002// Open Source Software; you can modify and/or share it under the terms of 003// the WPILib BSD license file in the root directory of this project. 004 005package edu.wpi.first.math.jni; 006 007/** Ellipse2d JNI. */ 008public final class Ellipse2dJNI extends WPIMathJNI { 009 /** 010 * Returns the nearest point that is contained within the ellipse. 011 * 012 * <p>Constructs an Ellipse2d object and runs its nearest() method. 013 * 014 * @param centerX The x coordinate of the center of the ellipse in meters. 015 * @param centerY The y coordinate of the center of the ellipse in meters. 016 * @param centerHeading The ellipse's rotation in radians. 017 * @param xSemiAxis The x semi-axis in meters. 018 * @param ySemiAxis The y semi-axis in meters. 019 * @param pointX The x coordinate of the point that this will find the nearest point to. 020 * @param pointY The y coordinate of the point that this will find the nearest point to. 021 * @param nearestPoint Array to store nearest point into. 022 */ 023 public static native void nearest( 024 double centerX, 025 double centerY, 026 double centerHeading, 027 double xSemiAxis, 028 double ySemiAxis, 029 double pointX, 030 double pointY, 031 double[] nearestPoint); 032 033 /** Utility class. */ 034 private Ellipse2dJNI() {} 035}