/development/apps/FontLab/src/com/android/fontlab/ |
FontLab.java | 310 size = Math.min(MAX_SIZE, Math.max(MIN_SIZE, size)); 319 scaleX = Math.min(MAX_SCALE_X, Math.max(MIN_SCALE_X, scaleX)); 332 private int mGamma = Math.round(1.0f * GAMMA_RANGE); 335 int gamma = Math.min(MAX_GAMMA, Math.max(MIN_GAMMA, mGamma + delta));
|
/external/v8/test/mjsunit/ |
mirror-object.js | 164 testObjectMirror({'1':void 0,'2':null,'f':function pow(x,y){return Math.pow(x,y);}}, 'Object', 'Object'); 178 assertEquals('property', global_mirror.property("Math").type()); 179 assertFalse(global_mirror.property("Math").isEnum(), "Math is enumerable" + global_mirror.property("Math").attributes()); 181 math_mirror = global_mirror.property("Math").value(); 183 assertFalse(math_mirror.property("E").isEnum(), "Math.E is enumerable");
|
/external/webkit/SunSpider/tests/sunspider-0.9/ |
date-format-tofte.js | 62 var beat = Math.floor(theSeconds/86.4); 150 var os = Math.abs(self.getTimezoneOffset()); 151 var h = ""+Math.floor(os/60); 184 return Math.round(self.getTime()/1000); 220 return 1 + Math.floor( ( z() + nyDay ) / 7 ); 223 return 1 + Math.floor( ( z() - ( 7 - nyDay ) ) / 7 ); 262 return Math.floor(diff/1000/60/60/24);
|
/external/webkit/SunSpider/tests/sunspider-0.9.1/ |
date-format-tofte.js | 62 var beat = Math.floor(theSeconds/86.4); 150 var os = Math.abs(self.getTimezoneOffset()); 151 var h = ""+Math.floor(os/60); 184 return Math.round(self.getTime()/1000); 220 return 1 + Math.floor( ( z() + nyDay ) / 7 ); 223 return 1 + Math.floor( ( z() - ( 7 - nyDay ) ) / 7 ); 262 return Math.floor(diff/1000/60/60/24);
|
/external/webkit/WebCore/inspector/front-end/ |
SummaryBar.js | 151 var percents = segments.map(function(s) { return Math.max(Math.round(100 * s.value / total), 1) }); 249 var segmentWidth = Math.round(w * percents[i] / 100); 259 ctx.moveTo(x + (i * Math.round(w / 20)) + 0.5, y); 260 ctx.lineTo(x + (i * Math.round(w / 20)) + 0.5, y + h); 267 ctx.moveTo(x + (i * Math.round(w / 20)) + 1.5, y); 268 ctx.lineTo(x + (i * Math.round(w / 20)) + 1.5, y + h);
|
/frameworks/base/core/java/android/widget/ |
GridView.java | 242 last = Math.min(startPos + mNumColumns, mItemCount); 245 startPos = Math.max(0, startPos - mNumColumns + 1); 316 mFirstPosition = Math.max(0, pos + 1); 331 mFirstPosition = Math.min(mFirstPosition, mSelectedPosition); 332 mFirstPosition = Math.min(mFirstPosition, mItemCount - 1); 341 lastPosition = Math.max(lastPosition, mSelectedPosition); 342 lastPosition = Math.min(lastPosition, mItemCount - 1); 364 rowStart = Math.max(0, rowEnd - numColumns + 1); 460 motionRowStart = Math.max(0, motionRowEnd - numColumns + 1); 532 bottomOffset = Math.min(bottomOffset, mListPadding.top - firstTop) [all...] |
/packages/apps/Gallery3D/src/com/cooliris/media/ |
DisplayItem.java | 102 mTargetTheta = 30.0f * (0.5f - (float) Math.random()); 109 mTargetTheta = 30.0f * (0.5f - (float) Math.random()); 265 mTargetTheta = 30.0f * (0.5f - (float) Math.random()); 278 if (Math.abs(spanDelta) < 10 * App.PIXEL_DENSITY) { 283 mSpanSpeed = Math.abs(span / (600 * App.PIXEL_DENSITY)); 288 mSpanDirection = Math.signum(spanDelta); 325 mTargetTheta = 30.0f * (0.5f - (float) Math.random());
|
TimeBar.java | 181 mPosition = Math.max(0.0f, Math.min(1.0f, markerX)); 312 * private float getPositionForKnobX(float knobX) { return Math.max(0f, 313 * Math.min(1f, knobX / (mTotalWidth - mKnob.getWidth()))); } 343 return Math.max(0f, Math.min(1f, normKnobX)); 349 final float ratio = Math.min(1f, 10f * dt); 359 velocity = -(float) Math.pow((1f - x / autoScrollMargin), 2); 361 velocity = (float) Math.pow(1f - (mWidth - x) / autoScrollMargin, 2);
|
/cts/tools/dasm/test/ |
all_opcodes.d | 136 invoke-virtual {v1}, java/lang/Math/sqrt(D)D 137 invoke-super {v1}, java/lang/Math/sqrt(D)D 138 invoke-direct {v1}, java/lang/Math/sqrt(D)D 139 invoke-static {v1}, java/lang/Math/sqrt(D)D 140 ;invoke-interface {v1}, java/lang/Math/sqrt(D)D 142 invoke-virtual/range {v1..v4}, java/lang/Math/sqrt(D)D 143 invoke-super/range {v1..v4}, java/lang/Math/sqrt(D)D 144 invoke-direct/range {v1..v4}, java/lang/Math/sqrt(D)D 145 invoke-static/range {v1..v4}, java/lang/Math/sqrt(D)D 146 ;invoke-interface/range {v1..v4}, java/lang/Math/sqrt(D) [all...] |
/external/webkit/JavaScriptCore/tests/mozilla/ecma/String/ |
15.5.4.8-1.js | 155 // this is the Math object 157 "var obj = Math; obj.split = String.prototype.split; typeof obj.split()", 159 eval("var obj = Math; obj.split = String.prototype.split; typeof obj.split()") ); 162 "var obj = Math; obj.split = String.prototype.split; Array.prototype.getClass = Object.prototype.toString; obj.getClass()", 164 eval("var obj = Math; obj.split = String.prototype.split; Array.prototype.getClass = Object.prototype.toString; obj.split().getClass()") ); 167 "var obj = Math; obj.split = String.prototype.split; obj.split().length", 169 eval("var obj = Math; obj.split = String.prototype.split; obj.split().length") ); 172 "var obj = Math; obj.split = String.prototype.split; obj.split()[0]", 173 "[object Math]", 174 eval("var obj = Math; obj.split = String.prototype.split; obj.split()[0]") ) [all...] |
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)) );
|
15.5.4.9-1.js | 163 // this is the Math object 165 "var obj = Math; obj.substring = String.prototype.substring; obj.substring(Math.PI)", 166 "ject Math]", 167 eval("var obj = Math; obj.substring = String.prototype.substring; obj.substring(Math.PI)") );
|
/frameworks/base/graphics/java/android/graphics/ |
Color.java | 121 int V = Math.max(b, Math.max(r, g)); 122 int temp = Math.min(b, Math.min(r, g)); 164 int V = Math.max(b, Math.max(r, g)); 165 int temp = Math.min(b, Math.min(r, g)); 190 int V = Math.max(b, Math.max(r, g)) [all...] |
/bionic/libm/man/ |
math.3 | 32 .\" from: @(#)math.3 6.10 (Berkeley) 5/6/91 33 .\" $FreeBSD: src/lib/msun/man/math.3,v 1.27 2005/11/17 13:00:00 ru Exp $ 36 .Dt MATH 3 42 .Nm math 47 .In math.h 49 These functions constitute the C math library. 208 A math library with many of the present functions appeared in
|
/cts/tests/tests/hardware/src/android/hardware/cts/ |
SensorManagerTest.java | 42 private static final double TWO_PI = 2 * Math.PI; 299 assertTrue(Math.abs(inclination) <= TWO_PI); 302 assertTrue(Math.abs(orientation[0]) <= TWO_PI); 303 assertTrue(Math.abs(orientation[1]) <= TWO_PI); 304 assertTrue(Math.abs(orientation[2]) <= TWO_PI);
|
/development/apps/OBJViewer/com/android/objviewer/ |
OBJViewer.java | 45 private static final float PI = (float)Math.PI; 46 private static final float TWO_PI = (float)(2.0*Math.PI); 47 private static final float PI_OVER_TWO = (float)(Math.PI/2.0); 187 float maxSpan = Math.max(spanX, spanY); 188 maxSpan = Math.max(maxSpan, spanZ);
|
/development/samples/GlobalTime/src/com/android/globaltime/ |
Shape.java | 38 public static final float DEGREES_TO_RADIANS = (float) Math.PI / 180.0f; 39 public static final float PI = (float) Math.PI; 40 public static final float TWO_PI = (float) (2.0 * Math.PI); 41 public static final float PI_OVER_TWO = (float) (Math.PI / 2.0); 109 return (float) Math.sqrt(vx * vx + vy * vy + vz * vz);
|
GlobalTime.java | 485 float twoPi = (float) (2.0 * Math.PI); 489 cosTheta[i] = (float)Math.cos(theta); 490 sinTheta[i] = (float)Math.sin(theta); 495 float scaleH = (float) (Math.PI / lightHeight); 498 cosPhi[j] = (float)Math.cos(phi); 499 sinPhi[j] = (float)Math.sin(phi); 534 return Math.abs(o1 - o2) < 0.001; 726 float delx = Math.abs(dx); 727 float dely = Math.abs(dy); 1023 Math.cos(Shape.TWO_PI * (day + 10) / 365.0)) [all...] |
/frameworks/base/graphics/tests/graphicstests/src/android/graphics/ |
BitmapTest.java | 171 int premul = Math.round(alpha * comp / 255.f); 172 int unpre = Math.round(255.0f * premul / alpha); 212 assertTrue("red", Math.abs(rr - r1) <= tolerance); 217 assertTrue("green", Math.abs(gg - g1) <= tolerance); 222 assertTrue("blue", Math.abs(bb - b1) <= tolerance);
|
/frameworks/base/libs/rs/java/Film/src/com/android/film/ |
FilmStripMesh.java | 21 import java.lang.Math; 72 float len = (float)java.lang.Math.sqrt(dx*dx + dy*dy + dz*dz); 79 nz = (float)java.lang.Math.sqrt(dx*dx + dy*dy); 81 len = (float)java.lang.Math.sqrt(nx*nx + ny*ny + nz*nz); 226 float len = (float)java.lang.Math.sqrt(t.nx * t.nx + t.ny * t.ny);
|
/packages/apps/Camera/src/com/android/camera/ui/ |
ZoomController.java | 118 int margin = Math.max(sSlider.getHeight(), mMaxLabelHeight); 180 maxWidth = Math.max(maxWidth, mTickLabels[i].getWidth()); 181 maxHeight = Math.max(maxHeight, mTickLabels[i].getHeight()); 203 + Math.max(sSlider.getHeight(), mMaxLabelHeight); 207 height = Math.max(sMinimalHeight, height);
|
/packages/apps/Gallery/src/com/android/camera/ |
GridViewSpecial.java | 229 mScrollY = Math.max(0, Math.min(mMaxScrollY, mScrollY)); 297 startRow = Math.max(Math.min(startRow, mRows - 1), 0); 298 endRow = Math.max(Math.min(endRow, mRows), 0); 405 mCurrentSelection = Math.min(index, mCount - 1); 524 int col = Math.min(mColumns - 1, 555 scrollTo(0, Math.round(scrollPosition * mMaxScrollY)); 560 y = Math.max(0, Math.min(mMaxScrollY, y)) [all...] |
/dalvik/libcore/math/src/main/java/java/math/ |
BigDecimal.java | 18 package java.math; 25 import org.apache.harmony.math.internal.nls.Messages; 381 // math.02=Scale out of range. 382 throw new NumberFormatException(Messages.getString("math.02")); //$NON-NLS-1$ 449 * specified math context. 488 * representation. The result is rounded according to the specified math 526 // math.03=Infinity or NaN 527 throw new NumberFormatException(Messages.getString("math.03")); //$NON-NLS-1$ 543 trailingZeros = Math.min(scale, Long.numberOfTrailingZeros(mantisa)); 662 * to the specified math context [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);
|
/external/emma/core/java12/com/vladium/util/ |
ByteArrayOStream.java | 58 final byte [] newbuf = new byte [Math.max (mbuflen << 1, capacity)]; 82 final byte [] newbuf = new byte [Math.max (mbuflen << 1, capacity)]; 107 final byte [] newbuf = new byte [Math.max (mbuflen << 1, capacity)]; 186 // final byte [] newbuf = new byte [Math.max (mbuflen << 1, capacity)]; 250 final byte [] newbuf = new byte [Math.max (mbuflen << 1, capacity)]; 279 final byte [] newbuf = new byte [Math.max (mbuflen << 1, capacity)];
|