Searched refs:distance (Results 1 - 25 of 47) sorted by relevance

12

/frameworks/base/graphics/java/android/graphics/
H A DPathMeasure.java75 * Pins distance to 0 <= distance <= getLength(), and then computes the
80 * @param distance The distance along the current contour to sample
85 public boolean getPosTan(float distance, float pos[], float tan[]) { argument
90 return native_getPosTan(native_instance, distance, pos, tan);
97 * Pins distance to 0 <= distance <= getLength(), and then computes the
101 * @param distance The distance alon
106 getMatrix(float distance, Matrix matrix, int flags) argument
143 native_getPosTan(int native_instance, float distance, float pos[], float tan[]) argument
144 native_getMatrix(int native_instance, float distance, int native_matrix, int flags) argument
[all...]
/frameworks/base/core/java/android/gesture/
H A DInstanceLearner.java54 double distance;
56 distance = GestureUtilities.cosineDistance(sample.vector, vector);
58 distance = GestureUtilities.squaredEuclideanDistance(sample.vector, vector);
61 if (distance == 0) {
64 weight = 1 / distance;
H A DGestureUtilities.java233 float distance = (float) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
234 if (distanceSoFar + distance >= increment) {
235 float ratio = (increment - distanceSoFar) / distance;
250 distanceSoFar += distance;
338 * Calculate the squared Euclidean distance between two vectors
342 * @return the distance
355 * Calculate the cosine distance between two instances
359 * @return the distance between 0 and Math.PI
/frameworks/base/tests/FrameworkTest/tests/src/com/android/frameworktest/listview/touch/
H A DListOfTouchablesTest.java77 int distance = TouchUtils.dragViewToY(this, lastChild,
81 lastTop - (distance - ViewConfiguration.getTouchSlop() - 1), lastChild.getTop());
H A DListTouchBottomGravityManyTest.java145 int distance = TouchUtils.dragViewBy(this, firstChild,
150 + (distance - ViewConfiguration.getTouchSlop() - 1), firstChild.getTop());
H A DListTouchManyTest.java184 int distance = TouchUtils.dragViewToY(this, lastChild,
188 lastTop - (distance - ViewConfiguration.getTouchSlop() - 1), lastChild.getTop());
/frameworks/base/tests/CoreTests/android/location/
H A DLocationTest.java157 float distance;
166 distance = zeroLocation.distanceTo(zeroLocation);
168 String.valueOf(distance);
169 assertEquals(message, distance, 0, 0);
171 distance = zeroLocation.distanceTo(testLocation);
173 String.valueOf(distance);
174 assertEquals(message, distance, 8885140.0, 1);
/frameworks/base/awt/java/awt/geom/
H A DPoint2D.java208 * Finds the square of the distance between the two specified points.
218 * @return the square of the distance between the two specified points.
227 * Finds the square of the distance between this point and the specified
234 * @return the square of the distance between this point and the specified
242 * Finds the square of the distance between this point and the specified
247 * @return the square of the distance between this point and the specified
255 * Finds the distance between the two specified points.
265 * @return the distance between the two specified points.
267 public static double distance(double x1, double y1, double x2, double y2) { method in class:Point2D
272 * Finds the distance betwee
280 public double distance(double px, double py) { method in class:Point2D
291 public double distance(Point2D p) { method in class:Point2D
[all...]
/frameworks/base/core/java/android/view/
H A DFocusFinder.java231 * Fudge-factor opportunity: how to calculate distance given major and minor
307 * @return The distance from the edge furthest in the given direction
331 * @return The distance along the major axis w.r.t the direction from the
356 * Find the distance on the minor axis w.r.t the direction to the nearest
361 * @return The distance.
367 // the distance between the center verticals
373 // the distance between the center horizontals
417 int distance = Integer.MAX_VALUE;
421 distance = x - touchableBounds.right + 1;
424 distance
[all...]
H A DGestureDetector.java76 * current move {@link MotionEvent}. The distance in x and y is also supplied for
81 * @param distanceX The distance along the X axis that has been scrolled since the last
82 * call to onScroll. This is NOT the distance between {@code e1}
84 * @param distanceY The distance along the Y axis that has been scrolled since the last
85 * call to onScroll. This is NOT the distance between {@code e1}
476 int distance = (deltaX * deltaX) + (deltaY * deltaY);
477 if (distance > mTouchSlopSquare) {
486 if (distance > mBiggerTouchSlopSquare) {
509 // A fling must travel the minimum tap distance
/frameworks/base/media/libdrm/mobile2/src/util/ustl-1.0/
H A Dustring.cpp138 const size_type len1 = distance (first1, last1), len2 = distance (first2, last2);
181 size_type nti = distance (first, last), bti = 0;
215 start = iterator (memblock::insert (memblock::iterator(start), distance(first, last) * n));
216 fill (memblock::iterator(start), first, distance(first, last), n);
253 assert (n || distance(first, last));
256 const size_type bte = distance(first, last), bti = distance(i1, i2) * n;
261 fill (memblock::iterator(first), i1, distance(i1, i2), n);
269 return (found < end() ? distance(begi
[all...]
H A Dubitset.h84 assert (size_t (distance (first, last)) <= s_WordBits && "Bit ranges must be 32 bits or smaller");
86 assert ((v & BitMask(value_type,distance(first,last))) == v && "The value is too large to fit in the given bit range");
103 assert (size_t (distance (first, last)) <= s_WordBits && "Bit ranges must be 32 bits or smaller");
105 return ((BitRef(first) >> (first % s_WordBits)) & BitMask(value_type,distance(first, last)));
H A Dbktrace.cpp74 nmSize = min (size_t (distance (mnStart, mnEnd)), 256U);
122 os.write (ss, distance (ss, se));
H A Dmemlink.h68 inline void link (const void* first, const void* last) { link (first, distance (first, last)); }
69 inline void link (void* first, void* last) { link (first, distance (first, last)); }
H A Duheap.h50 uoff_t iChild, iHole = 0, iEnd (distance (first, last));
74 RandomAccessIterator iParent = first + (distance(first, last) - 1) / 2;
H A Dumultiset.h74 return (distance (fr.first, fr.second));
90 reserve (size() + distance (i1, i2));
H A Dupredalgo.h219 mid = advance (first, distance (first,last) / 2);
249 mid = advance (first, distance (first,last) / 2);
291 const ForwardIterator1 slast = last1 - distance(first2, last2) + 1;
308 ForwardIterator1 s = last1 - distance(first2, last2);
467 if (distance (first, last) < 2)
491 if (distance (first, last) < 2)
571 ForwardIterator l, r, m = advance (first, distance (first, last) / 2);
577 return (advance (l, distance (m, r)));
H A Dumultimap.h76 const_iterator mid = advance (first, distance (first,last) / 2);
91 const_iterator mid = advance (first, distance (first,last) / 2);
113 reserve (size() + distance (i1, i2));
H A Duvector.h175 resize (distance (i1, i2));
192 resize (distance (i1, i2));
216 const uoff_t ipmi = distance (m_Data.begin(), memblock::iterator(ip));
243 ip = insert_space (ip, distance (i1, i2));
260 return (erase (ep1, distance(ep1, ep2)));
H A Dualgobase.cpp156 size_t nBytes (distance (first, last));
238 const size_t half1 (distance (first, middle)), half2 (distance (middle, last));
/frameworks/base/tests/FrameworkTest/tests/src/com/android/frameworktest/gridview/touch/
H A DGridTouchVerticalSpacingStackFromBottomTest.java103 int distance = TouchUtils.dragViewBy(this, firstChild,
108 + (distance - ViewConfiguration.getTouchSlop() - 1), firstChild.getTop());
H A DGridTouchVerticalSpacingTest.java92 int distance = TouchUtils.dragViewToY(this, lastChild, Gravity.TOP | Gravity.LEFT,
96 lastTop - (distance - ViewConfiguration.getTouchSlop() - 1), lastChild.getTop());
/frameworks/base/core/java/android/widget/
H A DScroller.java119 * @return The new X offset as an absolute distance from the origin.
128 * @return The new Y offset as an absolute distance from the origin.
137 * @return The start X offset as an absolute distance from the origin.
146 * @return The start Y offset as an absolute distance from the origin.
155 * @return The final X offset as an absolute distance from the origin.
164 * @return The final Y offset as an absolute distance from the origin.
200 float distance = (mVelocity * timePassedSeconds)
203 mCurrX = mStartX + Math.round(distance * mCoeffX);
208 mCurrY = mStartY + Math.round(distance * mCoeffY);
229 * Start scrolling by providing a starting point and the distance t
[all...]
/frameworks/base/include/utils/
H A DList.h141 return distance(begin(), end());
206 * Measure the distance between two iterators. On exist, "first"
215 unsigned int distance(iterator first, iterator last) { function in class:android::List
223 unsigned int distance(const_iterator first, const_iterator last) const { function in class:android::List
/frameworks/base/test-runner/android/test/
H A DTouchUtils.java540 * @return distance in pixels covered by the drag
562 * @return distance in pixels covered by the drag
577 int distance = (int) Math.sqrt(deltaX * deltaX + deltaY * deltaY);
579 drag(test, fromX, fromX + deltaX, fromY, fromY + deltaY, distance);
581 return distance;
594 * @return distance in pixels covered by the drag
616 * @return distance in pixels covered by the drag
630 int distance = (int)Math.sqrt(deltaX * deltaX + deltaY * deltaY);
631 drag(test, fromX, toX, fromY, toY, distance);
633 return distance;
[all...]

Completed in 612 milliseconds

12