/external/jmonkeyengine/engine/src/bullet-common/com/jme3/bullet/control/ragdoll/ |
D | HumanoidRagdollPreset.java | 7 import com.jme3.math.FastMath; 17 …, new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTE… in initBoneMap() 19 …boneMap.put("torso", new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, 0, 0, FastMath.QUA… in initBoneMap() 21 …g", new JointPreset(FastMath.PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI/2, -FastMath.QUARTER_PI… in initBoneMap() 23 boneMap.put("lowerleg", new JointPreset(0, -FastMath.PI, 0, 0, 0, 0)); in initBoneMap() 25 …("foot", new JointPreset(0, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastM… in initBoneMap() 27 …boneMap.put("upperarm", new JointPreset(FastMath.HALF_PI, -FastMath.QUARTER_PI, 0, 0, FastMath.HAL… in initBoneMap() 29 boneMap.put("lowerarm", new JointPreset(FastMath.HALF_PI, 0, 0, 0, 0, 0)); in initBoneMap() 31 …, new JointPreset(FastMath.QUARTER_PI, -FastMath.QUARTER_PI, FastMath.QUARTER_PI, -FastMath.QUARTE… in initBoneMap()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/integration/ |
D | LegendreGaussIntegrator.java | 25 import org.apache.commons.math.util.FastMath; 58 -1.0 / FastMath.sqrt(3.0), 59 1.0 / FastMath.sqrt(3.0) 70 -FastMath.sqrt(0.6), 72 FastMath.sqrt(0.6) 84 -FastMath.sqrt((15.0 + 2.0 * FastMath.sqrt(30.0)) / 35.0), 85 -FastMath.sqrt((15.0 - 2.0 * FastMath.sqrt(30.0)) / 35.0), 86 FastMath.sqrt((15.0 - 2.0 * FastMath.sqrt(30.0)) / 35.0), 87 FastMath.sqrt((15.0 + 2.0 * FastMath.sqrt(30.0)) / 35.0) 92 (90.0 - 5.0 * FastMath.sqrt(30.0)) / 180.0, [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/ode/nonstiff/ |
D | DormandPrince853Integrator.java | 20 import org.apache.commons.math.util.FastMath; 64 …(12.0 - 2.0 * FastMath.sqrt(6.0)) / 135.0, (6.0 - FastMath.sqrt(6.0)) / 45.0, (6.0 - FastMath.sqrt… 65 (6.0 + FastMath.sqrt(6.0)) / 30.0, 1.0/3.0, 1.0/4.0, 4.0/13.0, 127.0/195.0, 3.0/5.0, 73 {(12.0 - 2.0 * FastMath.sqrt(6.0)) / 135.0}, 76 {(6.0 - FastMath.sqrt(6.0)) / 180.0, (6.0 - FastMath.sqrt(6.0)) / 60.0}, 79 {(6.0 - FastMath.sqrt(6.0)) / 120.0, 0.0, (6.0 - FastMath.sqrt(6.0)) / 40.0}, 82 {(462.0 + 107.0 * FastMath.sqrt(6.0)) / 3000.0, 0.0, 83 (-402.0 - 197.0 * FastMath.sqrt(6.0)) / 1000.0, (168.0 + 73.0 * FastMath.sqrt(6.0)) / 375.0}, 86 … {1.0 / 27.0, 0.0, 0.0, (16.0 + FastMath.sqrt(6.0)) / 108.0, (16.0 - FastMath.sqrt(6.0)) / 108.0}, 89 {19.0 / 512.0, 0.0, 0.0, (118.0 + 23.0 * FastMath.sqrt(6.0)) / 1024.0, [all …]
|
D | AdaptiveStepsizeIntegrator.java | 26 import org.apache.commons.math.util.FastMath; 109 this.minStep = FastMath.abs(minStep); in AdaptiveStepsizeIntegrator() 110 this.maxStep = FastMath.abs(maxStep); in AdaptiveStepsizeIntegrator() 243 1.0e-6 : (0.01 * FastMath.sqrt(yOnScale2 / yDotOnScale2)); in initializeStep() 260 yDDotOnScale = FastMath.sqrt(yDDotOnScale) / h; in initializeStep() 264 final double maxInv2 = FastMath.max(FastMath.sqrt(yDotOnScale2), yDDotOnScale); in initializeStep() 266 FastMath.max(1.0e-6, 0.001 * FastMath.abs(h)) : in initializeStep() 267 FastMath.pow(0.01 / maxInv2, 1.0 / order); in initializeStep() 268 h = FastMath.min(100.0 * FastMath.abs(h), h1); in initializeStep() 269 h = FastMath.max(h, 1.0e-12 * FastMath.abs(t0)); // avoids cancellation when computing t1 - t0 in initializeStep() [all …]
|
D | GillIntegrator.java | 20 import org.apache.commons.math.util.FastMath; 57 { (FastMath.sqrt(2.0) - 1.0) / 2.0, (2.0 - FastMath.sqrt(2.0)) / 2.0 }, 58 { 0.0, -FastMath.sqrt(2.0) / 2.0, (2.0 + FastMath.sqrt(2.0)) / 2.0 } 63 1.0 / 6.0, (2.0 - FastMath.sqrt(2.0)) / 6.0, (2.0 + FastMath.sqrt(2.0)) / 6.0, 1.0 / 6.0
|
D | GraggBulirschStoerIntegrator.java | 27 import org.apache.commons.math.util.FastMath; 431 final double yi = FastMath.max(FastMath.abs(y1[i]), FastMath.abs(y2[i])); in rescale() 436 final double yi = FastMath.max(FastMath.abs(y1[i]), FastMath.abs(y2[i])); in rescale() 506 if (deltaNorm > 4 * FastMath.max(1.0e-15, initialNorm)) { in tryStep() 610 final double log10R = FastMath.log10(FastMath.max(1.0e-10, tol)); in integrate() 611 int targetIter = FastMath.max(1, in integrate() 612 FastMath.min(sequence.length - 2, in integrate() 613 (int) FastMath.floor(0.5 - 0.6 * log10R))); in integrate() 685 hNew = FastMath.abs(filterStep(stepSize * stabilityReduction, forward, false)); in integrate() 702 final double e = FastMath.abs(y1[j] - y1Diag[0][j]) / scale[j]; in integrate() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/complex/ |
D | Complex.java | 28 import org.apache.commons.math.util.FastMath; 117 if (FastMath.abs(real) < FastMath.abs(imaginary)) { in abs() 119 return FastMath.abs(real); in abs() 122 return FastMath.abs(imaginary) * FastMath.sqrt(1 + q * q); in abs() 125 return FastMath.abs(imaginary); in abs() 128 return FastMath.abs(real) * FastMath.sqrt(1 + q * q); in abs() 225 if (FastMath.abs(c) < FastMath.abs(d)) { in divide() 551 return createComplex(FastMath.cos(real) * MathUtils.cosh(imaginary), in cos() 552 -FastMath.sin(real) * MathUtils.sinh(imaginary)); in cos() 585 return createComplex(MathUtils.cosh(real) * FastMath.cos(imaginary), in cosh() [all …]
|
/external/jmonkeyengine/engine/src/terrain/com/jme3/terrain/heightmap/ |
D | FaultHeightMap.java | 34 import com.jme3.math.FastMath; 180 / (FastMath.sqrt(FastMath.sqr(x2 - x1) + FastMath.sqr(y2 - y1))); in addLineFault() 188 int intRadius = (int) FastMath.floor(radius); in addCircleFault() 201 float dmag = FastMath.sqrt(FastMath.sqr(dx) + FastMath.sqr(dy)); in addCircleFault() 204 dist = FastMath.sign(dmag - radius) in addCircleFault() 205 * FastMath.sqrt(FastMath.sqr(i - rx) + FastMath.sqr(j - ry)); in addCircleFault() 217 return FastMath.sign(dist) * faultHeight; in calcHeight() 220 if (FastMath.abs(dist) > range) { in calcHeight() 221 return FastMath.sign(dist) * faultHeight; in calcHeight() 223 float f = FastMath.abs(dist) / range; in calcHeight() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/ |
D | ComposableFunction.java | 21 import org.apache.commons.math.util.FastMath; 64 return FastMath.abs(d); 91 return FastMath.sin(d); 100 return FastMath.sqrt(d); 109 return FastMath.sinh(d); 118 return FastMath.exp(d); 127 return FastMath.expm1(d); 136 return FastMath.asin(d); 145 return FastMath.atan(d); 154 return FastMath.tan(d); [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/geometry/ |
D | Vector3D.java | 25 import org.apache.commons.math.util.FastMath; 111 double cosDelta = FastMath.cos(delta); in Vector3D() 112 this.x = FastMath.cos(alpha) * cosDelta; in Vector3D() 113 this.y = FastMath.sin(alpha) * cosDelta; in Vector3D() 114 this.z = FastMath.sin(delta); in Vector3D() 207 return FastMath.abs(x) + FastMath.abs(y) + FastMath.abs(z); in getNorm1() 214 return FastMath.sqrt (x * x + y * y + z * z); in getNorm() 228 return FastMath.max(FastMath.max(FastMath.abs(x), FastMath.abs(y)), FastMath.abs(z)); in getNormInf() 236 return FastMath.atan2(y, x); in getAlpha() 244 return FastMath.asin(z / getNorm()); in getDelta() [all …]
|
D | Rotation.java | 24 import org.apache.commons.math.util.FastMath; 138 double inv = 1.0 / FastMath.sqrt(q0 * q0 + q1 * q1 + q2 * q2 + q3 * q3); in Rotation() 181 double coeff = FastMath.sin(halfAngle) / norm; in Rotation() 183 q0 = FastMath.cos (halfAngle); in Rotation() 258 q0 = 0.5 * FastMath.sqrt(s + 1.0); in Rotation() 267 q1 = 0.5 * FastMath.sqrt(s + 1.0); in Rotation() 276 q2 = 0.5 * FastMath.sqrt(s + 1.0); in Rotation() 284 q3 = 0.5 * FastMath.sqrt(s + 1.0); in Rotation() 333 double coeff = FastMath.sqrt (u1u1 / v1v1); in Rotation() 344 double beta = FastMath.sqrt((u2u2 - u1u2 * coeffU) / (v2v2 - v1v2 * coeffV)); in Rotation() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/util/ |
D | MathUtils.java | 48 public static final double TWO_PI = 2 * FastMath.PI; 293 return FastMath.floor(result + 0.5); in binomialCoefficientDouble() 320 return FastMath.log(n); in binomialCoefficientLog() 328 return FastMath.log(binomialCoefficient(n,k)); in binomialCoefficientLog() 336 return FastMath.log(binomialCoefficientDouble(n, k)); in binomialCoefficientLog() 350 logSum += FastMath.log(i); in binomialCoefficientLog() 355 logSum -= FastMath.log(i); in binomialCoefficientLog() 408 return (FastMath.exp(x) + FastMath.exp(-x)) / 2.0; in cosh() 453 return equals(x, y, 1) || FastMath.abs(y - x) <= eps; in equals() 468 return equalsIncludingNaN(x, y) || (FastMath.abs(y - x) <= eps); in equalsIncludingNaN() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/analysis/solvers/ |
D | BrentSolver.java | 25 import org.apache.commons.math.util.FastMath; 142 if (FastMath.abs(yInitial) <= functionValueAccuracy) { in solve() 149 if (FastMath.abs(yMin) <= functionValueAccuracy) { in solve() 161 if (FastMath.abs(yMax) <= functionValueAccuracy) { in solve() 237 if (FastMath.abs(yMin) <= functionValueAccuracy) { in solve() 240 } else if (FastMath.abs(yMax) <= functionValueAccuracy) { in solve() 314 if (FastMath.abs(y2) < FastMath.abs(y1)) { in solve() 323 if (FastMath.abs(y1) <= functionValueAccuracy) { in solve() 332 FastMath.max(relativeAccuracy * FastMath.abs(x1), absoluteAccuracy); in solve() 333 if (FastMath.abs(dx) <= tolerance) { in solve() [all …]
|
D | MullerSolver.java | 23 import org.apache.commons.math.util.FastMath; 232 final double xplus = x1 + (-2.0 * y1) / (c1 + FastMath.sqrt(delta)); in solve() 233 final double xminus = x1 + (-2.0 * y1) / (c1 - FastMath.sqrt(delta)); in solve() 240 … final double tolerance = FastMath.max(relativeAccuracy * FastMath.abs(x), absoluteAccuracy); in solve() 241 if (FastMath.abs(x - oldx) <= tolerance) { in solve() 245 if (FastMath.abs(y) <= functionValueAccuracy) { in solve() 372 double dplus = b + FastMath.sqrt(delta); in solve2() 373 double dminus = b - FastMath.sqrt(delta); in solve2() 374 denominator = FastMath.abs(dplus) > FastMath.abs(dminus) ? dplus : dminus; in solve2() 377 denominator = FastMath.sqrt(b * b - delta); in solve2() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/distribution/ |
D | WeibullDistributionImpl.java | 25 import org.apache.commons.math.util.FastMath; 103 ret = 1.0 - FastMath.exp(-FastMath.pow(x / scale, shape)); in cumulativeProbability() 138 final double xscalepow = FastMath.pow(xscale, shape - 1); in density() 147 return (shape / scale) * xscalepow * FastMath.exp(-xscalepowshape); in density() 173 ret = scale * FastMath.pow(-FastMath.log(1.0 - p), 1.0 / shape); in inverseCumulativeProbability() 263 return FastMath.pow(scale * FastMath.log(2.0), 1.0 / shape); in getInitialDomain() 316 return sc * FastMath.exp(Gamma.logGamma(1 + (1 / sh))); in calculateNumericalMean() 335 FastMath.exp(Gamma.logGamma(1 + (2 / sh))) - in calculateNumericalVariance()
|
D | SaddlePointExpansion.java | 20 import org.apache.commons.math.util.FastMath; 49 private static final double HALF_LOG_2_PI = 0.5 * FastMath.log(MathUtils.TWO_PI); 111 if (FastMath.floor(z2) == z2) { in getStirlingError() 114 ret = Gamma.logGamma(z + 1.0) - (z + 0.5) * FastMath.log(z) + in getStirlingError() 147 if (FastMath.abs(x - mu) < 0.1 * (x + mu)) { in getDeviancePart() 163 ret = x * FastMath.log(x / mu) + mu - x; in getDeviancePart() 184 ret = n * FastMath.log(q); in logBinomialProbability() 190 ret = n * FastMath.log(p); in logBinomialProbability() 197 ret = -0.5 * FastMath.log(f) + ret; in logBinomialProbability()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/estimation/ |
D | LevenbergMarquardtEstimator.java | 23 import org.apache.commons.math.util.FastMath; 254 solvedCols = FastMath.min(rows, cols); in estimate() 307 xNorm = FastMath.sqrt(xNorm); in estimate() 327 maxCosine = FastMath.max(maxCosine, FastMath.abs(sum) / (s * cost)); in estimate() 337 diag[j] = FastMath.max(diag[j], jacNorm[j]); in estimate() 365 lmNorm = FastMath.sqrt(lmNorm); in estimate() 369 delta = FastMath.min(delta, lmNorm); in estimate() 414 delta = tmp * FastMath.min(delta, 10.0 * lmNorm); in estimate() 430 xNorm = FastMath.sqrt(xNorm); in estimate() 444 if (((FastMath.abs(actRed) <= costRelativeTolerance) && in estimate() [all …]
|
/external/jmonkeyengine/engine/src/core/com/jme3/scene/shape/ |
D | Sphere.java | 39 import com.jme3.math.FastMath; 171 float fAngle = FastMath.TWO_PI * fInvRS * iR; in setGeometryData() 172 afCos[iR] = FastMath.cos(fAngle); in setGeometryData() 173 afSin[iR] = FastMath.sin(fAngle); in setGeometryData() 186 float fAFraction = FastMath.HALF_PI * (-1.0f + fZFactor * iZ); // in (-pi/2, pi/2) in setGeometryData() 191 fZFraction = FastMath.sin(fAFraction); // in (-1,1) in setGeometryData() 200 float fSliceRadius = FastMath.sqrt(FastMath.abs(radius * radius in setGeometryData() 231 FastMath.INV_PI in setGeometryData() 232 * (FastMath.HALF_PI + FastMath.asin(fZFraction))); in setGeometryData() 234 float r = (FastMath.HALF_PI - FastMath.abs(fAFraction)) / FastMath.PI; in setGeometryData() [all …]
|
/external/jmonkeyengine/engine/src/core/com/jme3/math/ |
D | Eigen3f.java | 148 float max = FastMath.abs(mat.m00); in scaleMatrix() 149 float abs = FastMath.abs(mat.m01); in scaleMatrix() 154 abs = FastMath.abs(mat.m02); in scaleMatrix() 158 abs = FastMath.abs(mat.m11); in scaleMatrix() 162 abs = FastMath.abs(mat.m12); in scaleMatrix() 166 abs = FastMath.abs(mat.m22); in scaleMatrix() 197 float max = FastMath.abs(p00); in computeVectors() 199 float fAbs = FastMath.abs(p01); in computeVectors() 203 fAbs = FastMath.abs(p11); in computeVectors() 209 if (max >= FastMath.ZERO_TOLERANCE) { in computeVectors() [all …]
|
/external/jmonkeyengine/engine/src/core/com/jme3/scene/debug/ |
D | WireSphere.java | 35 import com.jme3.math.FastMath; 109 float rate = FastMath.TWO_PI / (float) samples; in updatePositions() 112 float x = radius * FastMath.cos(angle); in updatePositions() 113 float y = radius * FastMath.sin(angle); in updatePositions() 120 float x = radius * FastMath.cos(angle); in updatePositions() 121 float y = radius * FastMath.sin(angle); in updatePositions() 135 float scale = FastMath.sin(b * FastMath.PI); in updatePositions() 137 float x = radius * FastMath.cos(angle); in updatePositions() 138 float y = radius * FastMath.sin(angle); in updatePositions()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/optimization/general/ |
D | LevenbergMarquardtOptimizer.java | 25 import org.apache.commons.math.util.FastMath; 307 xNorm = FastMath.sqrt(xNorm); in doOptimize() 325 maxCosine = FastMath.max(maxCosine, FastMath.abs(sum) / (s * cost)); in doOptimize() 338 diag[j] = FastMath.max(diag[j], jacNorm[j]); in doOptimize() 369 lmNorm = FastMath.sqrt(lmNorm); in doOptimize() 372 delta = FastMath.min(delta, lmNorm); in doOptimize() 415 delta = tmp * FastMath.min(delta, 10.0 * lmNorm); in doOptimize() 431 xNorm = FastMath.sqrt(xNorm); in doOptimize() 456 if (((FastMath.abs(actRed) <= costRelativeTolerance) && in doOptimize() 465 … if ((FastMath.abs(actRed) <= 2.2204e-16) && (preRed <= 2.2204e-16) && (ratio <= 2.0)) { in doOptimize() [all …]
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/special/ |
D | Gamma.java | 22 import org.apache.commons.math.util.FastMath; 62 private static final double HALF_LOG_2_PI = 0.5 * FastMath.log(2.0 * FastMath.PI); 110 ret = ((x + .5) * FastMath.log(tmp)) - tmp + in logGamma() 111 HALF_LOG_2_PI + FastMath.log(sum / x); in logGamma() 179 … while (FastMath.abs(an/sum) > epsilon && n < maxIterations && sum < Double.POSITIVE_INFINITY) { in regularizedGammaP() 192 ret = FastMath.exp(-x + (a * FastMath.log(x)) - logGamma(a)) * sum; in regularizedGammaP() 267 ret = FastMath.exp(-x + (a * FastMath.log(x)) - logGamma(a)) * ret; in regularizedGammaQ() 307 return FastMath.log(x) - 0.5 / x - inv * ((1.0 / 12) + inv * (1.0 / 120 - inv / 252)); in digamma()
|
/external/jmonkeyengine/engine/src/core/com/jme3/light/ |
D | SpotLight.java | 36 import com.jme3.math.FastMath; 59 protected float spotInnerAngle = FastMath.QUARTER_PI / 8; 60 protected float spotOuterAngle = FastMath.QUARTER_PI / 6; 71 float innerCos=FastMath.cos(spotInnerAngle); in computePackedCos() 72 float outerCos=FastMath.cos(spotOuterAngle); in computePackedCos() 198 oc.write(spotInnerAngle, "spotInnerAngle", FastMath.QUARTER_PI / 8); in write() 199 oc.write(spotOuterAngle, "spotOuterAngle", FastMath.QUARTER_PI / 6); in write() 207 spotInnerAngle = ic.readFloat("spotInnerAngle", FastMath.QUARTER_PI / 8); in read() 208 spotOuterAngle = ic.readFloat("spotOuterAngle", FastMath.QUARTER_PI / 6); in read()
|
/external/apache-commons-math/src/main/java/org/apache/commons/math/linear/ |
D | EigenDecompositionImpl.java | 24 import org.apache.commons.math.util.FastMath; 149 if (FastMath.abs(mij - mji) > in isSymmetric() 150 (FastMath.max(FastMath.abs(mij), FastMath.abs(mji)) * eps)) { in isSymmetric() 488 if (FastMath.abs(realEigenvalues[i])>maxAbsoluteValue) { in findEigenVectors() 489 maxAbsoluteValue=FastMath.abs(realEigenvalues[i]); in findEigenVectors() 491 if (FastMath.abs(e[i])>maxAbsoluteValue) { in findEigenVectors() 492 maxAbsoluteValue=FastMath.abs(e[i]); in findEigenVectors() 498 if (FastMath.abs(realEigenvalues[i])<=MathUtils.EPSILON*maxAbsoluteValue) { in findEigenVectors() 501 if (FastMath.abs(e[i])<=MathUtils.EPSILON*maxAbsoluteValue) { in findEigenVectors() 512 … double delta = FastMath.abs(realEigenvalues[m]) + FastMath.abs(realEigenvalues[m + 1]); in findEigenVectors() [all …]
|
D | ArrayRealVector.java | 26 import org.apache.commons.math.util.FastMath; 379 data[i] = FastMath.pow(data[i], d); in mapPowToSelf() 388 data[i] = FastMath.exp(data[i]); in mapExpToSelf() 397 data[i] = FastMath.expm1(data[i]); in mapExpm1ToSelf() 406 data[i] = FastMath.log(data[i]); in mapLogToSelf() 415 data[i] = FastMath.log10(data[i]); in mapLog10ToSelf() 424 data[i] = FastMath.log1p(data[i]); in mapLog1pToSelf() 433 data[i] = FastMath.cosh(data[i]); in mapCoshToSelf() 442 data[i] = FastMath.sinh(data[i]); in mapSinhToSelf() 451 data[i] = FastMath.tanh(data[i]); in mapTanhToSelf() [all …]
|