public void record(float value) { longAvg = longAvg * (1 - LONG_FRACTION) + value * LONG_FRACTION; shortAvg = shortAvg * (1 - SHORT_FRACTION) + value * SHORT_FRACTION; min = MathUtils.min(value, min); max = MathUtils.max(value, max); }
/** Returns the closest value to 'a' that is in between 'low' and 'high' */ public final static float clamp(final float a, final float low, final float high) { return max(low, min(a, high)); }
m_proxyBuffer, m_proxyCount, computeTag(m_inverseDiameter * MathUtils.min(point1.x, point2.x) - 1, m_inverseDiameter * MathUtils.min(point1.y, point2.y) - 1)); int lastProxy = upperBound( point.y = point1.y + t * vy; float f = callback.reportParticle(i, point, n, t); fraction = MathUtils.min(fraction, f); if (fraction <= 0) { break;
triad.indexC = c; triad.flags = af | bf | cf; triad.strength = MathUtils.min(groupA.m_strength, groupB.m_strength); final float midPointx = (float) 1 / 3 * (pa.x + pb.x + pc.x); final float midPointy = (float) 1 / 3 * (pa.y + pb.y + pc.y);
minSeparation = MathUtils.min(minSeparation, separation);
minSeparation = MathUtils.min(minSeparation, separation);
float h = pressurePerWeight * MathUtils.max(0.0f, MathUtils.min(w, Settings.maxParticleWeight) - Settings.minParticleWeight); m_accumulationBuffer[i] = h;
tempy = vB.y - m_v2.y; float s2 = n.x * tempx + n.y * tempy; float s = MathUtils.min(s1, s2);
m_impulse = MathUtils.min(0.0f, m_impulse + impulse); impulse = m_impulse - oldImpulse;
pair.indexB = b; pair.flags = contact.flags; pair.strength = MathUtils.min(groupA.m_strength, groupB.m_strength); pair.distance = MathUtils.distance(m_positionBuffer.data[a], m_positionBuffer.data[b]); m_pairCount++;
public void record(float value) { longAvg = longAvg * (1 - LONG_FRACTION) + value * LONG_FRACTION; shortAvg = shortAvg * (1 - SHORT_FRACTION) + value * SHORT_FRACTION; min = MathUtils.min(value, min); max = MathUtils.max(value, max); }
/** Returns the closest value to 'a' that is in between 'low' and 'high' */ public final static float clamp(final float a, final float low, final float high) { return max(low, min(a, high)); }
j = newIndices[i]; if (j >= 0) { firstIndex = MathUtils.min(firstIndex, j); lastIndex = MathUtils.max(lastIndex, j + 1); } else {
int n = MathUtils.min(num, Settings.maxPolygonVertices);
g.center.x = inverseRadius * (g.center.x - lower.x); g.center.y = inverseRadius * (g.center.y - lower.y); int x = MathUtils.max(0, MathUtils.min((int) g.center.x, m_countX - 1)); int y = MathUtils.max(0, MathUtils.min((int) g.center.y, m_countY - 1)); queue.push(taskPool.pop().set(x, y, x + y * m_countX, g));
} else { b.m_sleepTime += h; minSleepTime = MathUtils.min(minSleepTime, b.m_sleepTime);
m_impulse.z = MathUtils.max(m_impulse.z, 0.0f); } else if (m_limitState == LimitState.AT_UPPER) { m_impulse.z = MathUtils.min(m_impulse.z, 0.0f);
alpha = MathUtils.min(alpha0 + (1.0f - alpha0) * beta, 1.0f); } else { alpha = 1.0f;
m_impulse = MathUtils.min(0.0f, m_impulse + impulse); impulse = m_impulse - oldImpulse;