/external/eclipse-windowbuilder/propertysheet/src/org/eclipse/wb/core/controls/ |
CSpinner.java | 210 setSelection(Math.max(m_value, m_minimum)); 218 setSelection(Math.min(m_value, m_maximum)); 235 newValue = Math.min(Math.max(m_minimum, newValue), m_maximum); 324 size.x = Math.min(size.x, wHint); 327 size.y = Math.min(size.y, hHint); 344 sSize.y = Math.min(sSize.y, Math.min(tSize.y, cRect.height)); 345 sSize.x = Math.min(sSize.x, cRect.width); 375 size.x = Math.min(size.x, wHint) [all...] |
/external/jmonkeyengine/engine/src/terrain/com/jme3/terrain/heightmap/ |
ParticleDepositionHeightMap.java | 160 x = (int) (Math.rint(Math.random() * (size - 1)));
161 y = (int) (Math.rint(Math.random() * (size - 1)));
170 (int) (Math.rint(
171 (Math.random() * (maxParticles - minParticles))
177 m = (int) (Math.rint(Math.random() * 7));
199 m = (int) (Math.rint((Math.random() * 8))); [all...] |
/external/v8/test/mjsunit/compiler/ |
regress-max.js | 30 // Test Math.max with negative zero as input. 31 for (var i = 0; i < 5; i++) Math.max(0, 0); 32 %OptimizeFunctionOnNextCall(Math.max); 33 Math.max(0, 0); 35 var r = Math.max(-0, -0);
|
/frameworks/base/graphics/java/android/graphics/ |
Color.java | 123 int V = Math.max(b, Math.max(r, g)); 124 int temp = Math.min(b, Math.min(r, g)); 166 int V = Math.max(b, Math.max(r, g)); 167 int temp = Math.min(b, Math.min(r, g)); 192 int V = Math.max(b, Math.max(r, g)) [all...] |
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
BitmapUtils.java | 80 int sampleSize = Math.min(w / minSideLength, h / minSideLength); 81 return Math.max(sampleSize, lowerBound); 89 int initialSize = Math.max(w / minSideLength, h / minSideLength); 110 int initialSize = Math.max(1, (int) FloatMath.ceil(1 / scale)); 118 int width = Math.round(bitmap.getWidth() * scale); 119 int height = Math.round(bitmap.getHeight() * scale); 143 float scale = Math.min( 156 float scale = (float) size / Math.min(w, h); 159 int width = Math.round(scale * bitmap.getWidth()); 160 int height = Math.round(scale * bitmap.getHeight()) [all...] |
/external/webkit/Source/WebCore/inspector/front-end/ |
SummaryBar.js | 151 var percents = segments.map(function(s) { return Math.max(Math.round(100 * s.value / total), 1) }); 233 ctx.arc(x + r, y + h - r, r, Math.PI, Math.PI / 2, true); 235 ctx.arc(x + w - r, y + h - r, r, Math.PI / 2, 0, true); 237 ctx.arc(x + w - r, y + r, r, 0, 3 * Math.PI / 2, true); 239 ctx.arc(x + r, y + r, r, Math.PI / 2, Math.PI, true); 249 var segmentWidth = Math.round(w * percents[i] / 100); 259 ctx.moveTo(x + (i * Math.round(w / 20)) + 0.5, y) [all...] |
/frameworks/opt/datetimepicker/src/com/android/datetimepicker/time/ |
RadialSelectorView.java | 146 mSelectionRadians = selectionDegrees * Math.PI / 180; 179 double hypotenuse = Math.sqrt( 188 int distanceToInnerNumber = (int) Math.abs(hypotenuse - innerNumberRadius); 190 int distanceToOuterNumber = (int) Math.abs(hypotenuse - outerNumberRadius); 219 int distanceToNumber = (int) Math.abs(hypotenuse - mLineLength); 230 float opposite = Math.abs(pointY - mYCenter); 231 double radians = Math.asin(opposite / hypotenuse); 232 int degrees = (int) (radians * 180 / Math.PI); 259 mCircleRadius = (int) (Math.min(mXCenter, mYCenter) * mCircleRadiusMultiplier); 276 int pointX = mXCenter + (int) (mLineLength * Math.sin(mSelectionRadians)) [all...] |
/packages/apps/Launcher2/src/com/android/launcher2/ |
AppWidgetResizeFrame.java | 136 mBackgroundPadding = (int) Math.ceil(density * BACKGROUND_PADDING); 178 mDeltaX = Math.max(-mBaselineX, deltaX); 179 mDeltaX = Math.min(mBaselineWidth - 2 * mTouchTargetWidth, mDeltaX); 181 mDeltaX = Math.min(mDragLayer.getWidth() - (mBaselineX + mBaselineWidth), deltaX); 182 mDeltaX = Math.max(-mBaselineWidth + 2 * mTouchTargetWidth, mDeltaX); 186 mDeltaY = Math.max(-mBaselineY, deltaY); 187 mDeltaY = Math.min(mBaselineHeight - 2 * mTouchTargetWidth, mDeltaY); 189 mDeltaY = Math.min(mDragLayer.getHeight() - (mBaselineY + mBaselineHeight), deltaY); 190 mDeltaY = Math.max(-mBaselineHeight + 2 * mTouchTargetWidth, mDeltaY); 244 if (Math.abs(hSpanIncF) > RESIZE_THRESHOLD) [all...] |
/external/guava/guava/src/com/google/common/hash/ |
BloomFilter.java | 107 return Math.pow( 108 1 - Math.exp(-numHashFunctions * ((double) insertions / (bits.size()))), 183 private static final double LN2 = Math.log(2); 196 return Math.max(1, (int) Math.round(m / n * LN2)); 209 return (int) (-n * Math.log(p) / LN2_SQUARED);
|
/external/replicaisland/src/com/replica/replicaisland/ |
SphereCollisionVolume.java | 115 otherRadius = Math.max(deltaX, deltaY); 137 maxX = Math.max(getMaxX(), other.getMaxX()); 138 minX = Math.min(getMinX(), other.getMinX()); 139 maxY = Math.max(getMaxY(), other.getMaxY()); 140 minY = Math.min(getMinY(), other.getMinY()); 149 final float diameter = Math.max(horizontalDelta, verticalDelta);
|
/external/valgrind/main/coregrind/ |
link_tool_exe_darwin.in | 74 use Math::BigInt; 157 my $stack_addr = Math::BigInt->new( $ala ) - $TX_STACK_OFFSET_BEFORE_TEXT; 159 my $stack_size_str = Math::BigInt::as_hex($TX_STACK_SIZE);
|
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma/GlobalObject/ |
15.1.2.4.js | 153 for ( var mag = 1; Math.pow(16,mag) <= n ; mag++ ) { 158 hex[index] = Math.floor( n / Math.pow(16,mag) ); 159 n -= Math.pow(16,mag) * Math.floor( n/Math.pow(16,mag) );
|
15.1.2.5-1.js | 153 for ( var mag = 1; Math.pow(16,mag) <= n ; mag++ ) { 158 hex[index] = Math.floor( n / Math.pow(16,mag) ); 159 n -= Math.pow(16,mag) * Math.floor( n/Math.pow(16,mag) );
|
/external/webkit/Source/JavaScriptCore/tests/mozilla/ecma/TypeConversion/ |
9.6.js | 77 if ( Math.abs( n ) == 0 || Math.abs( n ) == Number.POSITIVE_INFINITY) { 80 n = sign * Math.floor( Math.abs(n) ) 82 n = n % Math.pow(2,32); 85 n += Math.pow(2,32);
|
/frameworks/base/core/java/android/webkit/ |
DeviceOrientationService.java | 126 double alpha = Math.toDegrees(-rotationAngles[0]); 128 double beta = Math.toDegrees(-rotationAngles[1]); 130 double gamma = Math.toDegrees(rotationAngles[2]); 171 || Math.abs(alpha - mAlpha) > DELTA_DEGRESS 172 || Math.abs(beta - mBeta) > DELTA_DEGRESS 173 || Math.abs(gamma - mGamma) > DELTA_DEGRESS) {
|
/frameworks/base/core/java/com/android/internal/widget/multiwaveview/ |
Ease.java | 117 return -DOMAIN * (float) Math.cos(input/DURATION * (Math.PI/2)) + DOMAIN + START; 122 return DOMAIN * (float) Math.sin(input/DURATION * (Math.PI/2)) + START; 127 return -DOMAIN/2 * ((float)Math.cos(Math.PI*input/DURATION) - 1.0f) + START;
|
/packages/apps/Camera/src/com/android/camera/ |
PanoProgressBar.java | 144 mProgress = Math.min(mWidth, Math.max(0, mProgress)); 147 mRightMostProgress = Math.max(mRightMostProgress, mProgress); 151 mLeftMostProgress = Math.min(mLeftMostProgress, mProgress); 176 l = Math.max(mProgress - mIndicatorWidth, 0f); 180 r = Math.min(mProgress + mIndicatorWidth, mWidth);
|
/packages/apps/DeskClock/src/com/android/deskclock/widget/multiwaveview/ |
Ease.java | 117 return -DOMAIN * (float) Math.cos(input/DURATION * (Math.PI/2)) + DOMAIN + START; 122 return DOMAIN * (float) Math.sin(input/DURATION * (Math.PI/2)) + START; 127 return -DOMAIN/2 * ((float)Math.cos(Math.PI*input/DURATION) - 1.0f) + START;
|
/packages/apps/Gallery2/src/com/android/camera/ |
PanoProgressBar.java | 144 mProgress = Math.min(mWidth, Math.max(0, mProgress)); 147 mRightMostProgress = Math.max(mRightMostProgress, mProgress); 151 mLeftMostProgress = Math.min(mLeftMostProgress, mProgress); 176 l = Math.max(mProgress - mIndicatorWidth, 0f); 180 r = Math.min(mProgress + mIndicatorWidth, mWidth);
|
/packages/apps/Gallery2/src/com/android/gallery3d/ui/ |
AbstractSlotRenderer.java | 52 width = height = Math.min(width, height); 60 float scale = Math.min( 74 int w = Math.round(scale * v.getWidth()); 75 int h = Math.round(scale * v.getHeight()); 78 int s = Math.min(width, height) / 6; 83 int iconSize = Math.min(width, height) / 6;
|
/packages/apps/LegacyCamera/src/com/android/camera/panorama/ |
PanoProgressBar.java | 141 mProgress = Math.min(mWidth, Math.max(0, mProgress)); 144 mRightMostProgress = Math.max(mRightMostProgress, mProgress); 148 mLeftMostProgress = Math.min(mLeftMostProgress, mProgress); 173 l = Math.max(mProgress - mIndicatorWidth, 0f); 177 r = Math.min(mProgress + mIndicatorWidth, mWidth);
|
/development/samples/ApiDemos/src/com/example/android/apis/graphics/kube/ |
Layer.java | 47 float twopi = (float)Math.PI *2f; 52 float sin = (float)Math.sin(angle); 53 float cos = (float)Math.cos(angle);
|
/frameworks/base/services/java/com/android/server/power/ |
RampAnimator.java | 118 mAnimatedValue = Math.min(mAnimatedValue + amount, mTargetValue); 120 mAnimatedValue = Math.max(mAnimatedValue - amount, mTargetValue); 124 mCurrentValue = Math.round(mAnimatedValue);
|
/development/samples/devbytes/animation/Bouncer/src/com/example/android/bouncer/ |
Bouncer.java | 95 minX = Math.min(mShapeX, minX); 96 maxX = Math.max(mShapeX + mShapeW, maxX); 108 minY = Math.min(mShapeY, minY); 109 maxY = Math.max(mShapeY + mShapeH, maxY);
|
Bouncer1.java | 69 minX = Math.min(mShapeX, minX); 70 maxX = Math.max(mShapeX + mShapeW, maxX); 78 minY = Math.min(mShapeY, minY); 79 maxY = Math.max(mShapeY + mShapeH, maxY);
|