public class Utils extends Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Return a copy of the double array where every value has been casted to float
Midpoint circle algorithm: store the bounds of a circle in the given array.
Store the half-widths of a X line to scan to fill an ellipse of given axis lengths.
public static final void getXYEllipseBounds(int a, int b, int lineBounds)
ais the axis half-length in the X direction, and
bis the axis half-length in the Y direction.
The half-widhts will be stored in the array
lineBounds, which must be of size equal
to at least
This is an implementation of the McIlroy's algorithm, adapted freely from
a- half-length of the ellipse in the X direction
b- half-length of the ellipse in the Y direction
lineBounds- will store the half-length of the ellipse lines in the X direction
public static final void getXYCircleBounds(int radius, int lineBounds)
radius- the radius of the circle
lineBounds- the array to store bounds in
public static float copyDoubleArrayToFloat(double array)
Copyright © 2015–2017 Fiji. All rights reserved.