Commit 07997805 authored by iSergio's avatar iSergio
Browse files

Added Cartesian2.clamp, Cartesian3.clamp, and Cartesian4.clamp

parent bad24f03
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -555,6 +555,17 @@ public class Cartesian2 implements Packable {
    @JsMethod
    public static native Cartesian2[] unpackArray(JsArrayNumber array, Cartesian2[] result);

    /**
     * Constrain a value to lie between two values.
     * @param value The value to clamp.
     * @param min The minimum bound.
     * @param max The maximum bound.
     * @param result The object into which to store the result.
     * @return The clamped value such that min <= result <= max.
     */
    @JsMethod
    public static native Cartesian2 clamp(Cartesian2 value, Cartesian2 min, Cartesian2 max, Cartesian2 result);

    /**
     * Duplicates this Cartesian2 instance.
     *
+11 −0
Original line number Diff line number Diff line
@@ -872,6 +872,17 @@ public class Cartesian3 implements Packable {
    @JsMethod
    public static native Cartesian3[] unpackArray(JsArrayNumber array, Cartesian3[] result);

    /**
     * Constrain a value to lie between two values.
     * @param cartesian The value to clamp.
     * @param min The minimum bound.
     * @param max The maximum bound.
     * @param result The object into which to store the result.
     * @return The clamped value such that min <= value <= max.
     */
    @JsMethod
    public static native Cartesian3 clamp(Cartesian3 cartesian, Cartesian3 min, Cartesian3 max, Cartesian3 result);

    /**
     * Duplicates this Cartesian3 instance.
     *
+11 −0
Original line number Diff line number Diff line
@@ -130,6 +130,17 @@ public class Cartesian4 implements Packable {
    @JsMethod
    public static native Cartesian4 add(Cartesian4 left, Cartesian4 right, Cartesian4 result);

    /**
     * Constrain a value to lie between two values.
     * @param value The value to clamp.
     * @param min The minimum bound.
     * @param max The maximum bound.
     * @param result The object into which to store the result.
     * @return The clamped value such that min <= result <= max.
     */
    @JsMethod
    public static native Cartesian4 clamp(Cartesian4 value, Cartesian4 min, Cartesian4 max, Cartesian4 result);

    /**
     * Duplicates a Cartesian4 instance.
     *