/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/lang/ |
D | MathTest.java | 22 double HYP = Math.sqrt(2.0); 38 (Math.abs(-1908.8976) == 1908.8976)); in test_absD() 40 (Math.abs(1908.8976) == 1908.8976)); in test_absD() 49 (Math.abs(-1908.8976f) == 1908.8976f)); in test_absF() 51 (Math.abs(1908.8976f) == 1908.8976f)); in test_absF() 59 assertTrue("Incorrect int abs value", (Math.abs(-1908897) == 1908897)); in test_absI() 60 assertTrue("Incorrect int abs value", (Math.abs(1908897) == 1908897)); in test_absI() 69 (Math.abs(-19088976000089L) == 19088976000089L)); in test_absJ() 71 (Math.abs(19088976000089L) == 19088976000089L)); in test_absJ() 79 double r = Math.cos(Math.acos(ADJ / HYP)); in test_acosD() [all …]
|
/external/jmonkeyengine/engine/src/desktop/jme3tools/navigation/ |
D | NavCalculator.java | 98 trueCourse = (float) Math.toDegrees(Math.atan(dLong / dmp)); in mercatorSailing() 100 distance = (float) Math.abs(dLat / Math.cos(Math.toRadians(trueCourse))); in mercatorSailing() 121 double sgnDLong = 0 - (dLong / Math.abs(dLong)); in planeSailing() 122 if (Math.abs(dLong) > 180 * 60) { in planeSailing() 123 dLong = (360 * 60 - Math.abs(dLong)) * sgnDLong; in planeSailing() 129 redist = Math.abs(dLong); in planeSailing() 131 redist = Math.abs(dLong * (float) Math.cos(p1.getLatitude() * 2 * Math.PI / 360)); in planeSailing() 133 recourse = (float) Math.asin(0 - sgnDLong); in planeSailing() 134 recourse = recourse * 360 / 2 / (float) Math.PI; in planeSailing() 156 return Math.abs(tc); in convertCourse() [all …]
|
D | Coordinate.java | 79 … minsDecMins = Double.parseDouble(form.format((Math.abs(decCoordinate) - Math.abs(deg)) * 60)); in Coordinate() 142 str = su.padNumZero(Math.abs(deg), 2); in toStringDegMin() 143 … str += "\u00b0" + su.padNumZero(Math.abs(minsDecMins), 2, MINPRECISION) + "'" + quad; in toStringDegMin() 151 str = su.padNumZero(Math.abs(deg), 3); in toStringDegMin() 152 … str += "\u00b0" + su.padNumZero(Math.abs(minsDecMins), 2, MINPRECISION) + "'" + quad; in toStringDegMin() 191 if (Math.abs(decCoordinate) > 90.0) { in verify() 197 if (Math.abs(decCoordinate) > 180) { in verify()
|
/external/webkit/PerformanceTests/SunSpider/ |
D | UNCOVERED | 63 Math.E 64 Math.LN2 65 Math.LN10 66 Math.LOG2E 67 Math.LOG10E 68 Math.SQRT1_2 69 Math.SQRT2 70 Math.acos 71 Math.asin 72 Math.atan [all …]
|
/external/jmonkeyengine/engine/src/test/jme3test/bullet/ |
D | TestCollisionShapeFactory.java | 111 …geometry.setLocalTranslation((float) Math.random() * 10 -10, (float) Math.random() * 10 -10, (floa… in attachRandomGeometry() 112 …(new Quaternion().fromAngles((float) Math.random() * FastMath.PI, (float) Math.random() * FastMath… in attachRandomGeometry() 113 …geometry.setLocalScale((float) Math.random() * 10 -10, (float) Math.random() * 10 -10, (float) Mat… in attachRandomGeometry() 120 …spat.setLocalTranslation((float) Math.random() * 10, (float) Math.random() * 10, (float) Math.rand… in randomizeTransform() 121 …spat.setLocalTranslation((float) Math.random() * 10, (float) Math.random() * 10, (float) Math.rand… in randomizeTransform() 122 …spat.setLocalScale((float) Math.random() * 2, (float) Math.random() * 2, (float) Math.random() * 2… in randomizeTransform()
|
/external/jmonkeyengine/engine/src/core/com/jme3/math/ |
D | FastMath.java | 55 public static final float PI = (float) Math.PI; 91 return (int) Math.pow(2, Math.ceil(Math.log(number) / Math.log(2))); in nearestPowerOfTwo() 424 return (float) Math.acos(fValue); in acos() 445 return (float) Math.asin(fValue); in asin() 461 return (float) Math.atan(fValue); in atan() 472 return (float) Math.atan2(fY, fX); in atan2() 482 return (float) Math.ceil(fValue); in ceil() 496 if (Math.abs(radians) > PI) { // put us in -PI to +PI space in reduceSinAngle() 499 if (Math.abs(radians) > HALF_PI) {// put us in -PI/2 to +PI/2 space in reduceSinAngle() 518 if (Math.abs(fValue) <= Math.PI / 4) { in sin2() [all …]
|
/external/jmonkeyengine/engine/src/blender/com/jme3/scene/plugins/blender/textures/ |
D | TextureGeneratorMagic.java | 55 xyz[1] = -(float) Math.cos(xyz[0] - xyz[1] + xyz[2]) * turbulence; 61 xyz[0] = (float) Math.cos(xyz[0] - xyz[1] - xyz[2]) * turbulence; 67 xyz[2] = (float) Math.sin(-xyz[0] - xyz[1] - xyz[2]) * turbulence; 73 xyz[0] = -(float) Math.cos(-xyz[0] + xyz[1] - xyz[2]) * turbulence; 79 xyz[1] = -(float) Math.sin(-xyz[0] + xyz[1] + xyz[2]) * turbulence; 85 xyz[1] = -(float) Math.cos(-xyz[0] + xyz[1] + xyz[2]) * turbulence; 91 xyz[0] = (float) Math.cos(xyz[0] + xyz[1] + xyz[2]) * turbulence; 97 xyz[2] = (float) Math.sin(xyz[0] + xyz[1] - xyz[2]) * turbulence; 103 xyz[0] = -(float) Math.cos(-xyz[0] - xyz[1] + xyz[2]) * turbulence; 109 xyz[1] = -(float) Math.sin(xyz[0] - xyz[1] + xyz[2]) * turbulence; [all …]
|
D | UVProjectionGenerator.java | 62 float borderAngle = (float) Math.sqrt(2.0f) / 2.0f; in cubeProjection() 66 float dotNX = Math.abs(n.dot(x)); in cubeProjection() 67 float dorNY = Math.abs(n.dot(y)); in cubeProjection() 68 float dotNZ = Math.abs(n.dot(z)); in cubeProjection() 143 float sgn1 = Math.signum(triangle.get1().x-cx); in tubeProjection() 144 float sgn2 = Math.signum(triangle.get2().x-cx); in tubeProjection() 145 float sgn3 = Math.signum(triangle.get3().x-cx); in tubeProjection() 147 float ySideFactor = Math.signum(triangle.get1().y-cy)+ in tubeProjection() 148 Math.signum(triangle.get2().y-cy)+ in tubeProjection() 149 Math.signum(triangle.get3().y-cy); in tubeProjection() [all …]
|
D | NoiseGenerator.java | 268 int xi = (int) Math.floor(x); in NoiseFunction() 269 int yi = (int) Math.floor(y); in NoiseFunction() 270 int zi = (int) Math.floor(z); in NoiseFunction() 290 return (float) Math.sqrt(x * x + y * y + z * z); in DistanceFunction() 322 …float d = (float) (Math.sqrt(FastMath.abs(x)) + Math.sqrt(FastMath.abs(y)) + Math.sqrt(FastMath.ab… in DistanceFunction() 333 return (float) Math.sqrt(Math.sqrt(x * x + y * y + z * z)); in DistanceFunction() 340 …return (float) Math.pow(Math.pow(FastMath.abs(x), e) + Math.pow(FastMath.abs(y), e) + Math.pow(Fas… in DistanceFunction() 351 …float rmd, value = 1.0f, pwr = 1.0f, pwHL = (float) Math.pow(musgraveData.lacunarity, -musgraveDat… in MusgraveFunction() 364 rmd = (float) (musgraveData.octaves - Math.floor(musgraveData.octaves)); in MusgraveFunction() 376 float pwHL = (float) Math.pow(musgraveData.lacunarity, -musgraveData.h); in MusgraveFunction() [all …]
|
/external/eclipse-windowbuilder/propertysheet/src/org/eclipse/wb/core/controls/ |
D | CSpinner.java | 210 setSelection(Math.max(m_value, m_minimum)); in setMinimum() 218 setSelection(Math.min(m_value, m_maximum)); in setMaximum() 235 newValue = Math.min(Math.max(m_minimum, newValue), m_maximum); in setSelection() 324 size.x = Math.min(size.x, wHint); in computeSize() 327 size.y = Math.min(size.y, hHint); in computeSize() 344 sSize.y = Math.min(sSize.y, Math.min(tSize.y, cRect.height)); in layout() 345 sSize.x = Math.min(sSize.x, cRect.width); in layout() 375 size.x = Math.min(size.x, wHint); in computeSize() 378 size.y = Math.min(size.y, hHint); in computeSize() 395 sSize.y = Math.min(sSize.y, Math.min(tSize.y, cRect.height)); in layout() [all …]
|
/external/jmonkeyengine/engine/src/terrain/com/jme3/terrain/noise/ |
D | ShaderUtils.java | 181 return (float) Math.pow(x, 1 / gamma); in gammaCorrection() 185 return (float) Math.pow(x, Math.log(b) / Math.log(0.5)); in bias() 197 value += Math.sin(2 * Math.PI * f * s) / f; in sinValue() 200 value += fade * Math.sin(2 * Math.PI * f * s) / f; in sinValue() 205 return (float) Math.sqrt(x * x + y * y + z * z); in length() 217 float cax = (float) Math.cos(ax); in calcRotationMatrix() 218 float sax = (float) Math.sin(ax); in calcRotationMatrix() 219 float cay = (float) Math.cos(ay); in calcRotationMatrix() 220 float say = (float) Math.sin(ay); in calcRotationMatrix() 221 float caz = (float) Math.cos(az); in calcRotationMatrix() [all …]
|
/external/jmonkeyengine/engine/src/terrain/com/jme3/terrain/heightmap/ |
D | ParticleDepositionHeightMap.java | 160 x = (int) (Math.rint(Math.random() * (size - 1))); in load() 161 y = (int) (Math.rint(Math.random() * (size - 1))); in load() 170 (int) (Math.rint( in load() 171 (Math.random() * (maxParticles - minParticles)) in load() 177 m = (int) (Math.rint(Math.random() * 7)); in load() 199 m = (int) (Math.rint((Math.random() * 8))); in load()
|
/external/jmonkeyengine/engine/src/terrain/com/jme3/terrain/noise/filter/ |
D | OptimizedErode.java | 88 if (Math.abs(h - hV) > this.talus && Math.abs(h - tmp[idxVL]) > this.talus || vertT) { in filter() 91 if (Math.abs(h - hV) <= this.talus) { in filter() 97 if (Math.abs(h - hH) > this.talus && Math.abs(h - tmp[idxHL]) > this.talus || horizT) { in filter() 100 if (Math.abs(h - hH) <= this.talus) { in filter()
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | AtomicDoubleTest.java | 28 -Math.PI, 35 Math.PI, 100 double prev = Math.E; in testCompareAndSet() 101 double unused = Math.E + Math.PI; in testCompareAndSet() 137 double prev = Math.E; in testWeakCompareAndSet() 138 double unused = Math.E + Math.PI; in testWeakCompareAndSet() 156 double prev = Math.E; in testGetAndSet()
|
/external/replicaisland/src/com/replica/replicaisland/ |
D | CameraSystem.java | 105 mShakeOffsetY = (float) (Math.sin(mShakeTime * SHAKE_FREQUENCY) * mShakeMagnitude); in update() 136 if (Math.abs(xDelta) > X_FOLLOW_DISTANCE) { in update() 154 mFocalPosition.x = (float) Math.floor(mCurrentCameraPosition.x); in update() 157 mFocalPosition.y = (float) Math.floor(mCurrentCameraPosition.y + mShakeOffsetY); in update() 175 if (Math.abs(mFocalPosition.x - point.x) < (width + radius)) { in pointVisible() 176 if (Math.abs(mFocalPosition.y - point.y) < (height + radius)) { in pointVisible() 193 final float worldPixelWidth = Math.max(level.getLevelWidth(), width); in snapFocalPointToWorldBoundsX() 217 …final float worldPixelHeight = Math.max(level.getLevelHeight(), sSystemRegistry.contextParameters.… in snapFocalPointToWorldBoundsY()
|
D | PhysicsComponent.java | 86 if (touchingFloor && currentVelocity.y <= 0.0f && Math.abs(newVelocity.x) > 0.0f in update() 92 float frictionCoeffecient = Math.abs(currentVelocity.x) > 0.0f ? in update() 98 final float maxFriction = Math.abs(gravityVector.y) * getMass() in update() 101 if (maxFriction > Math.abs(newVelocity.x)) { in update() 109 if (Math.abs(newVelocity.x) < 0.01f) { in update() 113 if (Math.abs(newVelocity.y) < 0.01f) { in update() 190 final float bounciness = Math.min(getBounciness() + otherBounciness, 1.0f); in resolveCollision()
|
D | SphereCollisionVolume.java | 115 otherRadius = Math.max(deltaX, deltaY); in intersects() 137 maxX = Math.max(getMaxX(), other.getMaxX()); in growBy() 138 minX = Math.min(getMinX(), other.getMinX()); in growBy() 139 maxY = Math.max(getMaxY(), other.getMaxY()); in growBy() 140 minY = Math.min(getMinY(), other.getMinY()); in growBy() 149 final float diameter = Math.max(horizontalDelta, verticalDelta); in growBy()
|
/external/guava/guava/src/com/google/common/cache/ |
D | CacheStats.java | 214 Math.max(0, hitCount - other.hitCount), in minus() 215 Math.max(0, missCount - other.missCount), in minus() 216 Math.max(0, loadSuccessCount - other.loadSuccessCount), in minus() 217 Math.max(0, loadExceptionCount - other.loadExceptionCount), in minus() 218 Math.max(0, totalLoadTime - other.totalLoadTime), in minus() 219 Math.max(0, evictionCount - other.evictionCount)); in minus()
|
/external/guava/guava/src/com/google/common/hash/ |
D | BloomFilter.java | 107 return Math.pow( in computeExpectedFalsePositiveRate() 108 1 - Math.exp(-numHashFunctions * ((double) insertions / (bits.size()))), in computeExpectedFalsePositiveRate() 183 private static final double LN2 = Math.log(2); 196 return Math.max(1, (int) Math.round(m / n * LN2)); in optimalNumOfHashFunctions() 209 return (int) (-n * Math.log(p) / LN2_SQUARED); in optimalNumOfBits()
|
/external/jmonkeyengine/engine/src/core-plugins/com/jme3/texture/plugins/ |
D | DDSLoader.java | 96 private static final double LOG2 = Math.log(2); 222 int expectedMipmaps = 1 + (int) Math.ceil(Math.log(Math.max(height, width)) / LOG2); in loadHeader() 406 mipWidth = Math.max(mipWidth / 2, 1); in loadSizes() 407 mipHeight = Math.max(mipHeight / 2, 1); in loadSizes() 457 mipWidth = Math.max(mipWidth / 2, 1); in readGrayscale2D() 458 mipHeight = Math.max(mipHeight / 2, 1); in readGrayscale2D() 524 mipWidth = Math.max(mipWidth / 2, 1); in readRGB2D() 525 mipHeight = Math.max(mipHeight / 2, 1); in readRGB2D() 560 mipWidth = Math.max(mipWidth / 2, 1); in readDXT2D() 561 mipHeight = Math.max(mipHeight / 2, 1); in readDXT2D() [all …]
|
/external/guava/guava/src/com/google/common/math/ |
D | DoubleMath.java | 60 return (x >= 0.0) ? x : Math.floor(x); in roundIntermediate() 63 return (x >= 0.0) ? Math.ceil(x) : x; in roundIntermediate() 69 return (x >= 0.0) ? Math.ceil(x) : Math.floor(x); in roundIntermediate() 72 return Math.rint(x); in roundIntermediate() 196 return Math.log(x) / LN_2; // surprisingly within 1 ulp according to tests in log2() 199 private static final double LN_2 = Math.log(2);
|
/external/antlr/antlr-3.4/tool/src/main/java/org/antlr/misc/ |
D | Interval.java | 111 return Interval.create(Math.min(a,other.a), Math.max(b,other.b)); in union() 116 return Interval.create(Math.max(a,other.a), Math.min(b,other.b)); in intersection() 128 diff = Interval.create(Math.max(this.a,other.b+1), in differenceNotProperlyContained()
|
/external/eclipse-windowbuilder/propertysheet/src/org/eclipse/wb/internal/core/utils/ui/ |
D | DrawUtils.java | 115 k = Math.min(k_w, k_h); in drawScaledImage() 139 int count = Math.min(width / gc.getFontMetrics().getAverageCharWidth(), text.length()); in clipString() 172 lineHeight = Math.max(lineHeight, extent.y); in drawTextWrap() 255 double k = Math.max(kX, kY); in getThubmnail() 309 int bytesPerPixel = Math.max(1, srcData.depth / 8); in rotateOptimized() 340 int r = Math.max(0, Math.min(color.getRed() + delta, 255)); in getShiftedColor() 341 int g = Math.max(0, Math.min(color.getGreen() + delta, 255)); in getShiftedColor() 342 int b = Math.max(0, Math.min(color.getBlue() + delta, 255)); in getShiftedColor() 351 (int) Math.sqrt(c.getRed() in isDarkColor()
|
/external/antlr/antlr-3.4/runtime/JavaScript/tests/functional/ |
D | t015calc.g | 28 log returns [result]: 'ln' r=exp {result = Math.log(r);} 32 exp returns [result]: r=atom ('^' r2=atom {r = Math.pow(r,r2);} )? {result = r;} 39 | 'PI' {result = Math.PI;} 40 | 'E' {result = Math.E;}
|
/external/antlr/antlr-3.4/runtime/CSharp3/Sources/Antlr3.Runtime.Debug/Misc/ |
D | Stats.cs | 40 using Math = System.Math; typedef 83 return Math.Sqrt( s2 ); in Stddev() 99 return Math.Sqrt( s2 ); in Stddev()
|