/frameworks/rs/java/tests/ImageProcessing_jb/src/com/android/rs/image/ |
Greyscale.java | 19 import java.lang.Math;
|
WhiteBalance.java | 19 import java.lang.Math;
|
/packages/apps/Browser/src/com/android/browser/ |
UrlBarAutoShowManager.java | 79 remaining = Math.max(BaseUi.HIDE_TITLEBAR_DELAY - remaining, 121 float ady = Math.abs(dy); 122 float adx = Math.abs(event.getX() - mStartTouchX); 125 float angle = (float) Math.atan2(ady, adx);
|
/packages/apps/Calendar/src/com/android/calendar/ |
EventGeometry.java | 145 return (float) Math.sqrt(dx * dx + dy * dy); 150 return (float) Math.sqrt(dx * dx + dy * dy); 160 return (float) Math.sqrt(dx * dx + dy * dy); 165 return (float) Math.sqrt(dx * dx + dy * dy);
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/exif/ |
ByteBufferInputStream.java | 44 len = Math.min(len, mBuf.remaining());
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/colorpicker/ |
ColorRectView.java | 100 x = Math.max(Math.min(x, mWidth - mBorder), mBorder); 101 y = Math.max(Math.min(y, mHeight - mBorder), mBorder); 109 double hue = Math.PI * 2 * (mDotX - mBorder) / (mHeight - 2 * mBorder); 110 mHSVO[0] = ((float) Math.toDegrees(hue) + 360) % 360; 126 mRadius = Math.min(mCtrY, mCtrX) - 2 * mBorder; 184 mDotX = (float) (mBorder + (mHeight - 2 * mBorder) * Math.toRadians(hue) / (Math.PI * 2));
|
/packages/apps/Gallery2/src/com/android/gallery3d/util/ |
GalleryUtils.java | 91 int maxPixels = Math.max(metrics.heightPixels, metrics.widthPixels); 112 return Math.round(dpToPixel((float) dp)); 117 return Math.round(dpToPixel(meter * 39.37f * 160)); 149 private static final double RAD_PER_DEG = Math.PI / 180.0; 154 if ((Math.abs(latRad1 - latRad2) > RAD_PER_DEG) 155 || (Math.abs(lngRad1 - lngRad2) > RAD_PER_DEG)) { 166 double cosTerms = Math.cos((latRad1 + latRad2) / 2.0); 169 trigTerm = Math.sqrt(trigTerm); 177 double dlat = Math.sin(0.5 * (lat2 - lat1)); 178 double dlng = Math.sin(0.5 * (lng2 - lng1)) [all...] |
/packages/apps/Gallery2/src/com/android/photos/data/ |
AlbumSetLoader.java | 39 double random = Math.random();
|
/frameworks/base/location/java/android/location/ |
Location.java | 199 int degrees = (int) Math.floor(coordinate); 205 int minutes = (int) Math.floor(coordinate); 294 lat1 *= Math.PI / 180.0; 295 lat2 *= Math.PI / 180.0; 296 lon1 *= Math.PI / 180.0; 297 lon2 *= Math.PI / 180.0; 306 double U1 = Math.atan((1.0 - f) * Math.tan(lat1)); 307 double U2 = Math.atan((1.0 - f) * Math.tan(lat2)) [all...] |
/frameworks/base/core/java/android/widget/ |
StackView.java | 220 mFramePadding = (int) Math.ceil(density * FRAME_PADDING); 244 int duration = Math.round(mStackSlider.getDurationForNeutralPosition(mYVelocity)); 264 int duration = Math.round(mStackSlider.getDurationForOffscreenPosition(mYVelocity)); 562 final int newSlideAmount = Math.round(SLIDE_UP_RATIO * getMeasuredHeight()); 565 mSwipeThreshold = Math.round(SWIPE_THRESHOLD_RATIO * newSlideAmount); 652 if ((int) Math.abs(deltaY) > mTouchSlop && mSwipeGestureType == GESTURE_NONE) { 781 if (mTouchRect.contains(Math.round(x), Math.round(y))) { 852 duration = Math.round(mStackSlider.getDurationForNeutralPosition()); 854 duration = Math.round(mStackSlider.getDurationForOffscreenPosition()) [all...] |
LinearLayout.java | 582 mWeightSum = Math.max(0.0f, weightSum); 678 mTotalLength = Math.max(totalLength, totalLength + lp.topMargin + lp.bottomMargin); 705 mTotalLength = Math.max(totalLength, totalLength + childHeight + lp.topMargin + 709 largestChildHeight = Math.max(childHeight, largestChildHeight); 743 maxWidth = Math.max(maxWidth, measuredWidth); 752 weightedMaxWidth = Math.max(weightedMaxWidth, 755 alternativeMaxWidth = Math.max(alternativeMaxWidth, 787 mTotalLength = Math.max(totalLength, totalLength + largestChildHeight + 798 heightSize = Math.max(heightSize, getSuggestedMinimumHeight()); [all...] |
/build/tools/droiddoc/templates-pdk/assets/ |
carousel.js | 30 var i = Math.floor(droidListLength*Math.random()); 157 centeringPoint = Math.ceil(slidesAtOnce/2); 185 animation.origin = Math.abs(origin); 188 var motions = Math.abs(animation.goal - animation.origin); 190 var ease_right = function (t) { return (1 - Math.cos(t * Math.PI))/2.0; }; 195 var left = (ease(current_frame/animation.frames) * Math.abs(animation.goal - animation.origin)) - cp; 200 div.style.left = '-' + Math.round(left) + 'px'; 298 var originpoint = Math.abs(currentStripPosition) [all...] |
/dalvik/tests/003-omnibus-opcodes/src/ |
FloatMath.java | 119 * doesn't do the math for us. 149 * doesn't do the math for us. 285 * Test some java.lang.Math functions. 292 assert(approxEqual(Math.abs(ff), ff, 0.001f)); 293 assert(approxEqual(Math.abs(-ff), ff, 0.001f)); 294 assert(approxEqual(Math.min(ff, -5.0f), -5.0f, 0.001f)); 295 assert(approxEqual(Math.max(ff, -5.0f), ff, 0.001f)); 297 assert(approxEqual(Math.abs(dd), dd, 0.001)); 298 assert(approxEqual(Math.abs(-dd), dd, 0.001)); 299 assert(approxEqual(Math.min(dd, -5.0), -5.0, 0.001)) [all...] |
/development/samples/training/InteractiveChart/src/com/example/android/interactivechart/ |
InteractiveLineGraphView.java | 176 * The simple math function Y = fun(X) to draw on the chart. 181 return (float) Math.pow(x, 3) - x / 4; 248 mLabelHeight = (int) Math.abs(mLabelTextPaint.getFontMetrics().top); 282 Math.max(getSuggestedMinimumWidth(), 286 Math.max(getSuggestedMinimumHeight(), 362 mAxisXLinesBuffer[i * 4 + 0] = (float) Math.floor(mAxisXPositionsBuffer[i]); 364 mAxisXLinesBuffer[i * 4 + 2] = (float) Math.floor(mAxisXPositionsBuffer[i]); 371 mAxisYLinesBuffer[i * 4 + 1] = (float) Math.floor(mAxisYPositionsBuffer[i]); 373 mAxisYLinesBuffer[i * 4 + 3] = (float) Math.floor(mAxisYPositionsBuffer[i]); 411 final float d = (float) Math.ceil((float) Math.log10(num < 0 ? -num : num)) [all...] |
/packages/apps/Launcher2/src/com/android/launcher2/ |
PagedView.java | 351 mCurrentPage = Math.max(0, Math.min(currentPage, getPageCount() - 1)); 455 mCurrentPage = Math.max(0, Math.min(mNextPage, getPageCount() - 1)); 551 maxChildHeight = Math.max(maxChildHeight, child.getMeasuredHeight()); 578 int spacing = Math.max(offset, widthSize - offset - 695 float alpha = 1 - Math.abs(scrollProgress); 807 range[0] = Math.min(leftScreen, rightScreen); 808 range[1] = Math.max(leftScreen, rightScreen); [all...] |
/cts/tests/tests/graphics/src/android/graphics/drawable/shapes/cts/ |
ArcShapeTest.java | 60 final int SQUARE = Math.min(TEST_WIDTH, TEST_HEIGHT); 72 assertEquals((double)SQUARE / 2 / Math.sqrt(2), count, TOLERANCE);
|
OvalShapeTest.java | 55 final int SQUARE = Math.min(TEST_WIDTH, TEST_HEIGHT); 66 assertEquals((double)SQUARE / Math.sqrt(2), count, TOLERANCE);
|
/cts/tests/tests/holo/src/android/holo/cts/ |
DisplayInfoActivity.java | 41 int width = Math.round(dm.widthPixels / dm.density); 42 int height = Math.round(dm.heightPixels / dm.density);
|
/dalvik/dx/src/com/android/dx/merge/ |
SortableType.java | 90 max = Math.max(max, 1); // unknown, so assume it's a root. 94 max = Math.max(max, implemented.depth);
|
/development/samples/CrossCompatibility/src/com/example/android/touchexample/ |
TouchExampleView.java | 77 mScaleFactor = Math.max(0.1f, Math.min(mScaleFactor, 5.0f));
|
/development/samples/CubeLiveWallpaper/src/com/example/android/livecubes/cube2/ |
CubeWallpaper2.java | 261 float newy = (float)(Math.sin(xrot) * z + Math.cos(xrot) * y); 262 float newz = (float)(Math.cos(xrot) * z - Math.sin(xrot) * y); 265 float newx = (float)(Math.sin(yrot) * newz + Math.cos(yrot) * x); 266 newz = (float)(Math.cos(yrot) * newz - Math.sin(yrot) * x);
|
/external/apache-http/src/org/apache/http/impl/io/ |
ContentLengthInputStream.java | 206 long remaining = Math.min(n, this.contentLength - this.pos); 210 int l = read(buffer, 0, (int)Math.min(BUFFER_SIZE, remaining));
|
/external/apache-xml/src/main/java/org/apache/xpath/functions/ |
FuncSubstring.java | 63 // Double.MIN_VALUE doesn't work with math below 70 start = Math.round(start); 77 int end = (int) (Math.round(len) + start) - 1;
|
/external/jmonkeyengine/engine/src/core/com/jme3/shadow/ |
PssmShadowUtil.java | 35 import com.jme3.math.FastMath; 36 import com.jme3.math.Matrix4f; 39 import static java.lang.Math.max; 40 import static java.lang.Math.min;
|
/external/jsilver/src/com/google/clearsilver/jsilver/functions/string/ |
SliceFunction.java | 24 import static java.lang.Math.max; 25 import static java.lang.Math.min;
|