HomeSort by relevance Sort by last modified time
    Searched refs:MathUtils (Results 1 - 25 of 307) sorted by null

1 2 3 4 5 6 7 8 91011>>

  /external/libgdx/gdx/test/com/badlogic/gdx/math/
MathUtilsTest.java 4 import static com.badlogic.gdx.math.MathUtils.*;
9 import com.badlogic.gdx.math.MathUtils;
15 assertEquals(10, MathUtils.lerpAngleDeg(10, 30, 0.0f), 0.01f);
16 assertEquals(20, MathUtils.lerpAngleDeg(10, 30, 0.5f), 0.01f);
17 assertEquals(30, MathUtils.lerpAngleDeg(10, 30, 1.0f), 0.01f);
22 assertEquals(350, MathUtils.lerpAngleDeg(350, 10, 0.0f), 0.01f);
23 assertEquals(0, MathUtils.lerpAngleDeg(350, 10, 0.5f), 0.01f);
24 assertEquals(10, MathUtils.lerpAngleDeg(350, 10, 1.0f), 0.01f);
29 assertEquals(10, MathUtils.lerpAngleDeg(10, 350, 0.0f), 0.01f);
30 assertEquals(0, MathUtils.lerpAngleDeg(10, 350, 0.5f), 0.01f);
    [all...]
  /external/libgdx/gdx/src/com/badlogic/gdx/graphics/g3d/particles/values/
RectangleSpawnShapeValue.java 3 import com.badlogic.gdx.math.MathUtils;
24 int a = MathUtils.random(-1,1);
27 tx = MathUtils.random(1)==0 ? -width/ 2 : width/ 2;
29 ty = MathUtils.random(1)==0 ? -height / 2 : height/ 2;
30 tz = MathUtils.random(1)==0 ? -depth/2 : depth/2;
33 ty = MathUtils.random(height) - height / 2;
34 tz = MathUtils.random(depth) - depth / 2;
39 tz = MathUtils.random(1)==0 ? -depth/ 2 : depth/ 2;
41 ty = MathUtils.random(1)==0 ? -height / 2 : height/ 2;
42 tx = MathUtils.random(1)==0 ? -width/2 : width/2
    [all...]
EllipseSpawnShapeValue.java 3 import com.badlogic.gdx.math.MathUtils;
29 float minT =0, maxT = MathUtils.PI2;
31 maxT = MathUtils.PI;
34 maxT = -MathUtils.PI;
36 float t = MathUtils.random(minT, maxT);
41 vector.set(0, height / 2 * MathUtils.sin(t), depth/2 * MathUtils.cos(t));
45 vector.set(width / 2 * MathUtils.cos(t), 0, depth/2 * MathUtils.sin(t));
49 vector.set(width / 2 * MathUtils.cos(t), height / 2 * MathUtils.sin(t), 0)
    [all...]
CylinderSpawnShapeValue.java 3 import com.badlogic.gdx.math.MathUtils;
26 float ty = MathUtils.random(height) - hf;
34 radiusX = MathUtils.random(width)/2;
35 radiusZ = MathUtils.random(depth)/2;
43 spawnTheta = MathUtils.random(360f);
45 if(isRadiusXZero) spawnTheta = MathUtils.random(1) == 0 ? -90 : 90;
46 else if(isRadiusZZero) spawnTheta = MathUtils.random(1)==0 ? 0 : 180;
49 vector.set(radiusX*MathUtils.cosDeg(spawnTheta), ty, radiusZ*MathUtils.sinDeg(spawnTheta));
LineSpawnShapeValue.java 3 import com.badlogic.gdx.math.MathUtils;
23 float a = MathUtils.random();
  /libcore/luni/src/main/java/libcore/math/
MathUtils.java 19 public final class MathUtils {
20 private MathUtils() { }
  /external/libgdx/tests/gdx-tests/src/com/badlogic/gdx/tests/
DirtyRenderingTest.java 21 import com.badlogic.gdx.math.MathUtils;
58 Gdx.gl.glClearColor(MathUtils.random(), MathUtils.random(), MathUtils.random(), MathUtils.random());
TextButtonTest.java 22 import com.badlogic.gdx.math.MathUtils;
39 t.setX(MathUtils.random(0, Gdx.graphics.getWidth()));
40 t.setY(MathUtils.random(0, Gdx.graphics.getHeight()));
41 t.setWidth(MathUtils.random(50, 200));
42 t.setHeight(MathUtils.random(0, 100));
PolygonSpriteTest.java 31 import com.badlogic.gdx.math.MathUtils;
66 sprite.setPosition(MathUtils.random(-30, 440), MathUtils.random(-30, 290));
67 sprite.setColor(MathUtils.random(), MathUtils.random(), MathUtils.random(), 1.0f);
68 sprite.setScale(MathUtils.random(0.5f, 1.5f), MathUtils.random(0.5f, 1.5f));
  /external/apache-commons-math/src/main/java/org/apache/commons/math/stat/descriptive/
StatisticalSummaryValues.java 22 import org.apache.commons.math.util.MathUtils;
140 return MathUtils.equalsIncludingNaN(stat.getMax(), getMax()) &&
141 MathUtils.equalsIncludingNaN(stat.getMean(), getMean()) &&
142 MathUtils.equalsIncludingNaN(stat.getMin(), getMin()) &&
143 MathUtils.equalsIncludingNaN(stat.getN(), getN()) &&
144 MathUtils.equalsIncludingNaN(stat.getSum(), getSum()) &&
145 MathUtils.equalsIncludingNaN(stat.getVariance(), getVariance());
155 int result = 31 + MathUtils.hash(getMax());
156 result = result * 31 + MathUtils.hash(getMean());
157 result = result * 31 + MathUtils.hash(getMin())
    [all...]
AbstractStorelessUnivariateStatistic.java 21 import org.apache.commons.math.util.MathUtils;
169 return MathUtils.equalsIncludingNaN(stat.getResult(), this.getResult()) &&
170 MathUtils.equalsIncludingNaN(stat.getN(), this.getN());
180 return 31* (31 + MathUtils.hash(getResult())) + MathUtils.hash(getN());
MultivariateSummaryStatistics.java 34 import org.apache.commons.math.util.MathUtils;
376 return MathUtils.equalsIncludingNaN(stat.getGeometricMean(), getGeometricMean()) &&
377 MathUtils.equalsIncludingNaN(stat.getMax(), getMax()) &&
378 MathUtils.equalsIncludingNaN(stat.getMean(), getMean()) &&
379 MathUtils.equalsIncludingNaN(stat.getMin(), getMin()) &&
380 MathUtils.equalsIncludingNaN(stat.getN(), getN()) &&
381 MathUtils.equalsIncludingNaN(stat.getSum(), getSum()) &&
382 MathUtils.equalsIncludingNaN(stat.getSumSq(), getSumSq()) &&
383 MathUtils.equalsIncludingNaN(stat.getSumLog(), getSumLog()) &&
394 int result = 31 + MathUtils.hash(getGeometricMean())
    [all...]
  /frameworks/base/libs/hwui/
FloatColor.h 20 #include "utils/MathUtils.h"
43 return MathUtils::areEqual(r, other.r)
44 && MathUtils::areEqual(g, other.g)
45 && MathUtils::areEqual(b, other.b)
46 && MathUtils::areEqual(a, other.a);
  /external/apache-commons-math/src/main/java/org/apache/commons/math/exception/
NonMonotonousSequenceException.java 19 import org.apache.commons.math.util.MathUtils;
37 private final MathUtils.OrderDirection direction;
63 this(wrong, previous, index, MathUtils.OrderDirection.INCREASING, true);
80 MathUtils.OrderDirection direction,
82 super(direction == MathUtils.OrderDirection.INCREASING ?
100 public MathUtils.OrderDirection getDirection() {
  /external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/
SimpleRealPointChecker.java 21 import org.apache.commons.math.util.MathUtils;
38 private static final double DEFAULT_RELATIVE_THRESHOLD = 100 * MathUtils.EPSILON;
41 private static final double DEFAULT_ABSOLUTE_THRESHOLD = 100 * MathUtils.SAFE_MIN;
SimpleScalarValueChecker.java 21 import org.apache.commons.math.util.MathUtils;
38 private static final double DEFAULT_RELATIVE_THRESHOLD = 100 * MathUtils.EPSILON;
41 private static final double DEFAULT_ABSOLUTE_THRESHOLD = 100 * MathUtils.SAFE_MIN;
SimpleVectorialPointChecker.java 21 import org.apache.commons.math.util.MathUtils;
38 private static final double DEFAULT_RELATIVE_THRESHOLD = 100 * MathUtils.EPSILON;
41 private static final double DEFAULT_ABSOLUTE_THRESHOLD = 100 * MathUtils.SAFE_MIN;
SimpleVectorialValueChecker.java 21 import org.apache.commons.math.util.MathUtils;
38 private static final double DEFAULT_RELATIVE_THRESHOLD = 100 * MathUtils.EPSILON;
41 private static final double DEFAULT_ABSOLUTE_THRESHOLD = 100 * MathUtils.SAFE_MIN;
  /frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
PathDestructionActivity.java 25 import android.util.MathUtils;
60 left = MathUtils.random(getWidth() - MIN_SIZE);
61 top = MathUtils.random(getHeight() - MIN_SIZE);
62 right = left + MathUtils.random(getWidth() - left);
63 bottom = top + MathUtils.random(getHeight() - top);
74 int red = MathUtils.random(255);
75 int green = MathUtils.random(255);
76 int blue = MathUtils.random(255);
  /frameworks/support/design/base/android/support/design/widget/
MathUtils.java 19 class MathUtils {
  /external/libgdx/gdx/src/com/badlogic/gdx/graphics/g3d/utils/shapebuilders/
SphereShapeBuilder.java 21 import com.badlogic.gdx.math.MathUtils;
54 final float auo = MathUtils.degreesToRadians * angleUFrom;
55 final float stepU = (MathUtils.degreesToRadians * (angleUTo - angleUFrom)) / divisionsU;
56 final float avo = MathUtils.degreesToRadians * angleVFrom;
57 final float stepV = (MathUtils.degreesToRadians * (angleVTo - angleVFrom)) / divisionsV;
78 final float t = MathUtils.sin(angleV);
79 final float h = MathUtils.cos(angleV) * hh;
84 curr1.position.set(MathUtils.cos(angleU) * hw * t, h, MathUtils.sin(angleU) * hd * t).mul(transform);
  /external/apache-commons-math/src/main/java/org/apache/commons/math/complex/
Complex.java 27 import org.apache.commons.math.util.MathUtils;
284 return 37 * (17 * MathUtils.hash(imaginary) +
285 MathUtils.hash(real));
530 * {@link MathUtils#cosh} and {@link MathUtils#sinh}.</p>
551 return createComplex(FastMath.cos(real) * MathUtils.cosh(imaginary),
552 -FastMath.sin(real) * MathUtils.sinh(imaginary));
564 * {@link MathUtils#cosh} and {@link MathUtils#sinh}.</p>
585 return createComplex(MathUtils.cosh(real) * FastMath.cos(imaginary)
    [all...]
  /external/libgdx/tests/gdx-tests-lwjgl3/src/com/badlogic/gdx/tests/lwjgl3/
MultiWindowCursorTest.java 7 import com.badlogic.gdx.math.MathUtils;
21 if (MathUtils.randomBoolean()) {
23 Cursor.SystemCursor systemCursor = systemCursors[MathUtils.random(systemCursors.length - 1)];
27 if (MathUtils.randomBoolean()) {
  /external/libgdx/gdx/src/com/badlogic/gdx/math/collision/
Sphere.java 21 import com.badlogic.gdx.math.MathUtils;
35 private static final float PI_4_3 = MathUtils.PI * 4f / 3f;
73 return 4 * MathUtils.PI * this.radius * this.radius;
  /external/apache-commons-math/src/main/java/org/apache/commons/math/fraction/
Fraction.java 26 import org.apache.commons.math.util.MathUtils;
270 final int d = MathUtils.gcd(num, den);
489 int d1 = MathUtils.gcd(denominator, fraction.denominator);
492 int uvp = MathUtils.mulAndCheck(numerator, fraction.denominator);
493 int upv = MathUtils.mulAndCheck(fraction.numerator, denominator);
495 (isAdd ? MathUtils.addAndCheck(uvp, upv) :
496 MathUtils.subAndCheck(uvp, upv),
497 MathUtils.mulAndCheck(denominator, fraction.denominator));
510 int d2 = (tmodd1==0)?d1:MathUtils.gcd(tmodd1, d1);
519 MathUtils.mulAndCheck(denominator/d1
    [all...]

Completed in 377 milliseconds

1 2 3 4 5 6 7 8 91011>>