HomeSort by relevance Sort by last modified time
    Searched refs:Math (Results 301 - 325 of 1968) sorted by null

<<11121314151617181920>>

  /frameworks/base/media/java/android/media/
ThumbnailUtils.java 182 int max = Math.max(width, height);
185 int w = Math.round(scale * width);
186 int h = Math.round(scale * height);
280 (int) Math.ceil(Math.sqrt(w * h / maxNumOfPixels));
282 (int) Math.min(Math.floor(w / minSideLength),
283 Math.floor(h / minSideLength));
383 int deltaXHalf = Math.max(0, deltaX / 2);
384 int deltaYHalf = Math.max(0, deltaY / 2)
    [all...]
  /frameworks/base/tools/layoutlib/bridge/src/android/graphics/
Gradient_Delegate.java 137 pos = pos - (float)Math.floor(pos);
142 pos = Math.abs(pos);
145 int intPart = (int)Math.floor(pos);
167 pos = pos - (float)Math.floor(pos);
171 int intPart = (int)Math.floor(pos);
SweepGradient_Delegate.java 196 angle = (float) (dy < 0 ? 3 * Math.PI / 2 : Math.PI / 2);
198 angle = (float) (dx < 0 ? Math.PI : 0);
200 angle = (float) Math.atan(dy / dx);
203 angle += Math.PI * 2;
206 angle += Math.PI;
211 data[index++] = getGradientColor((float) (angle / (2 * Math.PI)));
  /packages/apps/Gallery2/src/com/android/gallery3d/filtershow/imageshow/
ImageTinyPlanet.java 67 value = Math.min(mTinyPlanetRep.getMaximum(), value);
68 value = Math.max(mTinyPlanetRep.getMinimum(), value);
88 return (float) (Math.atan2(dx, dy) * 180 / Math.PI);
102 return (float) (((angleB - angleA) % 360) * Math.PI / 180);
  /packages/apps/Gallery2/src/com/android/gallery3d/util/
MotionEventHelper.java 112 float result = (float) Math.atan2(v[0], -v[1]);
113 if (result < -Math.PI / 2) {
114 result += Math.PI;
115 } else if (result > Math.PI / 2) {
116 result -= Math.PI;
  /packages/apps/LegacyCamera/src/com/android/camera/
Util.java 109 return Math.round(sPixelDensity * dp);
199 (int) Math.ceil(Math.sqrt(w * h / maxNumOfPixels));
201 (int) Math.min(Math.floor(w / minSideLength),
202 Math.floor(h / minSideLength));
317 return (float) Math.sqrt(dx * dx + dy * dy);
364 int dist = Math.abs(orientation - orientationHistory);
365 dist = Math.min( dist, 360 - dist );
390 int targetHeight = Math.min(display.getHeight(), display.getWidth())
    [all...]
  /packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
SuggestionCursorWithExtrasTest.java 39 checkSuggestionCursorExtraColumnValue("extra_float", new Float(Math.E));
73 checkCursorExtraRowDouble(Math.PI);
74 checkCursorExtraRowDouble(-Math.PI);
87 checkCursorExtraRowFloat((float) Math.E);
88 checkCursorExtraRowFloat((float) -Math.E);
  /packages/screensavers/PhotoTable/src/com/android/dreams/phototable/
PhotoSource.java 169 int rawLongSide = Math.max(options.outWidth, options.outHeight);
170 int rawShortSide = Math.min(options.outWidth, options.outHeight);
174 float insideRatio = Math.max((float) longSide / (float) rawLongSide,
176 float outsideRatio = Math.max((float) longSide / (float) rawLongSide,
190 rawLongSide = Math.max(options.outWidth, options.outHeight);
191 rawShortSide = Math.max(options.outWidth, options.outHeight);
193 ratio = Math.max((float) longSide / (float) rawLongSide,
196 if (Math.abs(ratio - 1.0f) > 0.001) {
210 (float) Math.floor(image.getWidth() / 2f),
211 (float) Math.floor(image.getHeight() / 2f))
    [all...]
  /frameworks/base/core/java/com/android/internal/widget/
LockPatternView.java 284 mBitmapWidth = Math.max(mBitmapWidth, bitmap.getWidth());
285 mBitmapHeight = Math.max(mBitmapHeight, bitmap.getHeight());
465 result = Math.max(specSize, desired);
495 viewWidth = viewHeight = Math.min(viewWidth, viewHeight);
498 viewHeight = Math.min(viewWidth, viewHeight);
501 viewWidth = Math.min(viewWidth, viewHeight);
530 if (Math.abs(dRow) == 2 && Math.abs(dColumn) != 1) {
534 if (Math.abs(dColumn) == 2 && Math.abs(dRow) != 1)
    [all...]
  /external/jmonkeyengine/engine/src/core-plugins/com/jme3/texture/plugins/
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);
406 mipWidth = Math.max(mipWidth / 2, 1);
407 mipHeight = Math.max(mipHeight / 2, 1);
457 mipWidth = Math.max(mipWidth / 2, 1);
458 mipHeight = Math.max(mipHeight / 2, 1);
524 mipWidth = Math.max(mipWidth / 2, 1);
525 mipHeight = Math.max(mipHeight / 2, 1)
    [all...]
  /external/guava/guava/src/com/google/common/math/
DoubleMath.java 17 package com.google.common.math;
20 import static com.google.common.math.DoubleUtils.IMPLICIT_BIT;
21 import static com.google.common.math.DoubleUtils.SIGNIFICAND_BITS;
22 import static com.google.common.math.DoubleUtils.getExponent;
23 import static com.google.common.math.DoubleUtils.getSignificand;
24 import static com.google.common.math.DoubleUtils.isFinite;
25 import static com.google.common.math.DoubleUtils.isNormal;
26 import static com.google.common.math.DoubleUtils.next;
27 import static com.google.common.math.DoubleUtils.scaleNormalize;
28 import static com.google.common.math.MathPreconditions.checkInRange
    [all...]
  /external/replicaisland/src/com/replica/replicaisland/
PhysicsComponent.java 86 if (touchingFloor && currentVelocity.y <= 0.0f && Math.abs(newVelocity.x) > 0.0f
92 float frictionCoeffecient = Math.abs(currentVelocity.x) > 0.0f ?
98 final float maxFriction = Math.abs(gravityVector.y) * getMass()
101 if (maxFriction > Math.abs(newVelocity.x)) {
109 if (Math.abs(newVelocity.x) < 0.01f) {
113 if (Math.abs(newVelocity.y) < 0.01f) {
190 final float bounciness = Math.min(getBounciness() + otherBounciness, 1.0f);
  /external/webkit/Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/
15.1.2.3-1.js 415 array[item++] = new TestCase( SECTION, "parseFloat(Math.PI)", Math.PI, parseFloat(Math.PI));
416 array[item++] = new TestCase( SECTION, "parseFloat(Math.LN2)", Math.LN2, parseFloat(Math.LN2));
417 array[item++] = new TestCase( SECTION, "parseFloat(Math.LN10)", Math.LN10, parseFloat(Math.LN10));
418 array[item++] = new TestCase( SECTION, "parseFloat(Math.LOG2E)", Math.LOG2E, parseFloat(Math.LOG2E))
    [all...]
  /external/webkit/Source/JavaScriptCore/tests/mozilla/ecma/String/
15.5.4.7-1.js 183 result6 = Math.min(Math.max(position, 0), result5);
187 return Math.min(position, result5);
214 if ( Math.abs(n) == 0 || Math.abs(n) == Infinity ) {
220 return ( sign * Math.floor(Math.abs(n)) );
15.5.4.7-2.js 139 "var m = Math; m.lastIndexOf = String.prototype.lastIndexOf; m.lastIndexOf('t', "+ i + ")",
141 eval("var m = Math; m.lastIndexOf = String.prototype.lastIndexOf; m.lastIndexOf('t', "+ i + ")") );
182 result6 = Math.min(Math.max(position, 0), result5);
186 return Math.min(position, result5);
213 if ( Math.abs(n) == 0 || Math.abs(n) == Infinity ) {
219 return ( sign * Math.floor(Math.abs(n)) );
  /external/webkit/Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/
9.7.js 69 num = sign * Math.floor( Math.abs( num ) );
71 num = num % Math.pow(2,16);
92 array[item++] = new TestCase( "9.7", "String.fromCharCode(Math.pow(2,16)-1).charCodeAt(0)", 65535, String.fromCharCode(Math.pow(2,16)-1).charCodeAt(0) );
93 array[item++] = new TestCase( "9.7", "String.fromCharCode(Math.pow(2,16)).charCodeAt(0)", 0, String.fromCharCode(Math.pow(2,16)).charCodeAt(0) );
108 array[item++] = new TestCase( "9.7", "String.fromCharCode(Math.pow(2,16)-1).charCodeAt(0)", 65535, String.fromCharCode(Math.pow(2,16)-1).charCodeAt(0) );
109 array[item++] = new TestCase( "9.7", "String.fromCharCode(Math.pow(2,16)).charCodeAt(0)", 0, String.fromCharCode(Math.pow(2,16)).charCodeAt(0) )
    [all...]
  /frameworks/base/core/java/android/gesture/
GestureStroke.java 72 len += Math.sqrt(Math.pow(p.x - tmpPoints[(i - 1) * 2], 2)
73 + Math.pow(p.y - tmpPoints[(i -1 ) * 2 + 1], 2));
139 float dx = Math.abs(x - mX);
140 float dy = Math.abs(y - mY);
188 float dx = Math.abs(x - mX);
189 float dy = Math.abs(y - mY);
  /frameworks/base/services/java/com/android/server/location/
LocationFudger.java 88 private static final double PREVIOUS_WEIGHT = Math.sqrt(1 - NEW_WEIGHT * NEW_WEIGHT);
249 lat = Math.round(lat / latGranularity) * latGranularity;
251 lon = Math.round(lon / lonGranularity) * lonGranularity;
260 coarse.setAccuracy(Math.max(mAccuracyInMeters, coarse.getAccuracy()));
337 return distance / APPROXIMATE_METERS_PER_DEGREE_AT_EQUATOR / Math.cos(Math.toRadians(lat));
350 mAccuracyInMeters = Math.max(accuracyInMeters, MINIMUM_ACCURACY_IN_METERS);
  /packages/apps/Browser/src/com/android/browser/
WebStorageSizeManager.java 197 mAppCacheMaxSize = Math.max(mGlobalLimit / 4,
284 Math.min(QUOTA_INCREASE_STEP, totalUnusedQuota) :
373 2 << ((int) Math.floor(Math.log10(
375 long maxSizeBytes = (long) Math.min(Math.floor(
377 Math.floor(freeSpaceBytes / 2));
  /packages/apps/Gallery2/src/com/android/gallery3d/filtershow/filters/
ColorSpaceMatrix.java 136 float mag = (float) Math.sqrt(2.0);
140 mag = (float) Math.sqrt(3.0);
142 float yrc = (float) Math.sqrt(2.0) / mag;
152 float zrs = (float) Math.sin(rot * Math.PI / 180.0);
153 float zrc = (float) Math.cos(rot * Math.PI / 180.0);
  /packages/apps/Gallery2/src/com/android/gallery3d/ui/
TileImageView.java 225 mOffsetX = Math.round(width / 2f + (range.left - centerX) * scale);
226 mOffsetY = Math.round(height / 2f + (range.top - centerY) * scale);
231 mOffsetX = Math.round(width / 2f - centerX * scale);
232 mOffsetY = Math.round(height / 2f - centerY * scale);
235 fromLevel = Math.max(0, Math.min(fromLevel, mLevelCount - 2));
236 endLevel = Math.min(fromLevel + 2, mLevelCount);
305 double radians = Math.toRadians(-rotation);
309 double cos = Math.cos(radians);
310 double sin = Math.sin(radians)
    [all...]
  /development/samples/ApiDemos/src/com/example/android/apis/graphics/spritetext/
LabelMaker.java 183 minWidth = Math.max(minWidth, background.getMinimumWidth());
184 minHeight = Math.max(minHeight, background.getMinimumHeight());
192 ascent = (int) Math.ceil(-textPaint.ascent());
193 descent = (int) Math.ceil(textPaint.descent());
194 measuredTextWidth = (int) Math.ceil(textPaint.measureText(text));
197 int textWidth = Math.min(mStrikeWidth,measuredTextWidth);
201 int height = Math.max(minHeight, textHeight + padHeight);
202 int width = Math.max(minWidth, textWidth + padWidth);
228 lineHeight = Math.max(lineHeight, height);
  /cts/tools/cts-api-coverage/src/com/android/cts/apicoverage/
XmlReport.java 70 + Math.round(pkg.getCoveragePercentage())
83 + Math.round(apiClass.getCoveragePercentage())
131 + Math.round((float)totalCoveredMethods / totalMethods * 100.0f) + "\" />");
  /external/antlr/antlr-3.4/runtime/Ruby/test/functional/parser/
calc.rb 42 log returns [result]: 'ln' r=exp {$result = Math.log($r.result)}
53 | 'PI' {$result = Math::PI}
54 | 'E' {$result = Math::E}
  /external/eclipse-windowbuilder/propertysheet/src/org/eclipse/wb/internal/core/utils/ui/
DrawUtils.java 115 k = Math.min(k_w, k_h);
139 int count = Math.min(width / gc.getFontMetrics().getAverageCharWidth(), text.length());
172 lineHeight = Math.max(lineHeight, extent.y);
255 double k = Math.max(kX, kY);
309 int bytesPerPixel = Math.max(1, srcData.depth / 8);
340 int r = Math.max(0, Math.min(color.getRed() + delta, 255));
341 int g = Math.max(0, Math.min(color.getGreen() + delta, 255));
342 int b = Math.max(0, Math.min(color.getBlue() + delta, 255))
    [all...]

Completed in 1230 milliseconds

<<11121314151617181920>>