Atomically adds the given deltas to the current hi and lo values.

@param deltaHi the delta to apply to the hi value
@param deltaLo the delta to apply to the lo value
558956
public void add(int deltaHi, int deltaLo) {
        while (true) {
            long encoded = get();
            long update = encode(getHi(encoded) + deltaHi, getLo(encoded) + deltaLo);
            if (compareAndSet(encoded, update))
                return;
        }
    }
658014
private void resolveToCurrent(List<Delta<E>> deltas)
    {
        int lineOffset = 0;

        for (Delta<E> d : deltas) {
            Chunk<E> original = d.getOriginal();
            Chunk<E> revised = d.getRevised();

            int pos = original.getPosition() + lineOffset;
            // delete lines
            for (int i = 0; i < original.size(); i++) {
                int origLine = elementList.remove(pos);
                currentRevisionContent.remove(pos);
                if (origLine != -1) {
                    sourceRevisions.set(origLine, currentRevision);
                }
            }

            for (int i = 0; i < revised.size(); i++) {
                currentRevisionContent.add(pos + i, revised.getLines().get(i));
                elementList.add(pos + i, -1);
            }

            lineOffset += revised.size() - original.size();
        }
    }
751549
public static void scale(double[][] x, double lo, double hi) {
        int n = x.length;
        int p = x[0].length;

        double[] min = colMin(x);
        double[] max = colMax(x);

        for (int j = 0; j < p; j++) {
            double scale = max[j] - min[j];
            if (!Math.isZero(scale)) {
                for (int i = 0; i < n; i++) {
                    x[i][j] = (x[i][j] - min[j]) / scale;
                }
            } else {
                for (int i = 0; i < n; i++) {
                    x[i][j] = 0.5;
                }
            }
        }
    }
398931
public void update(int delta) {
		if ((sprite == null) && (defaultImageName != null)) {
			loadSystemParticleImage();
		}
		
		removeMe.clear();
		ArrayList emitters = new ArrayList(this.emitters);
		for (int i=0;i<emitters.size();i++) {
			ParticleEmitter emitter = (ParticleEmitter) emitters.get(i);
			if (emitter.isEnabled()) {
				emitter.update(this, delta);
				if (removeCompletedEmitters) {
					if (emitter.completed()) {
						removeMe.add(emitter);
						particlesByEmitter.remove(emitter);
					}
				}
			}
		}
		this.emitters.removeAll(removeMe);
		
		pCount = 0;
		
		if (!particlesByEmitter.isEmpty())
		{
			Iterator it= particlesByEmitter.keySet().iterator();
			while (it.hasNext())
			{
				ParticleEmitter emitter = (ParticleEmitter) it.next();
				if (emitter.isEnabled()) {
					ParticlePool pool = (ParticlePool) particlesByEmitter.get(emitter);
					for (int i=0;i<pool.particles.length;i++) {
						if (pool.particles[i].life > 0) {
							pool.particles[i].update(delta);
							pCount++;
						}
					}
				}
			}
		}
	}
1344657
def get_and_add(self, delta):
        '''
        
        '''
        with self._lock.exclusive:
            oldval = self._value
            self._value += delta
            return oldval
694118
@SuppressWarnings("unchecked")
    public static NumberList delta(Map<String, Object> currentMap, NumberList previousMap) {
        return delta(currentMap, (Map)previousMap.numbers);
    }
962425
def increment(self, counter_name, delta):
    
    current_value = self.counters.get(counter_name, 0)
    new_value = current_value + delta
    self.counters[counter_name] = new_value
    return new_value
647786
public static void increment(String name, TagList list, long delta) {
    final MonitorConfig config = MonitorConfig.builder(name).withTags(list).build();
    increment(config, delta);
  }
264343
void addDelta(TableKelp db, int offset, int length)
  {
    if (_delta == null) {
      _delta = new int[2 * db.getDeltaMax()];
    }
    
    _delta[_deltaTail++] = offset;
    _delta[_deltaTail++] = length;
  }
403523
public void addUUID( long lo, long hi ) {
    if (C16Chunk.isNA(lo, hi)) {
      addNA();
      return;
    }
    if( _ms==null || _ds== null || _sparseLen >= _ms.len() )
      append2slowUUID();
    _ms.set(_sparseLen,lo);
    _ds[_sparseLen] = Double.longBitsToDouble(hi);
    if (_id != null) _id[_sparseLen] = _len;
    _sparseLen++;
    _len++;
    assert _sparseLen <= _len;
  }
527429
public static boolean isUnique(List<GeoLocation> list, double delta)
    {
        Location[] array = new Location[list.size()];
        int index = 0;
        for (GeoLocation gl : list)
        {
            array[index++] = gl.getLocation();
        }
        return (Location.radius(array) <= delta);
    }
1101323
public void plusDays(long delta)
    {
        if (delta != 0)
        {
            long result = getDay() + delta;
            if (result >= 1 && result <= 28)
            {
                setDay((int) result);
            }
            else
            {
                ZonedDateTime zonedDateTime = ZonedDateTime.from(this);
                ZonedDateTime plusDays = zonedDateTime.plusDays(delta);
                set(plusDays);
            }
        }
    }
910816
public static final double addLongitude(double longitude, double delta)
    {
        double gha = longitudeToGHA(longitude);
        gha -= delta;
        return ghaToLongitude(normalizeAngle(gha));
    }
1160786
public void plusMonths(int delta)
    {
        if (delta != 0)
        {
            int result = getMonth() -1 + delta;
            setMonth(Math.floorMod(result, 12) + 1);
            plusYears(Math.floorDiv(result, 12));
        }
    }
810163
public static int delta(int[] data, int start, int length, int init) {
                final int nextinit = data[start + length - 1];
                for (int i = length - 1; i > 0; --i) {
                        data[start + i] -= data[start + i - 1];
                }
                data[start] -= init;
                return nextinit;
        }
482844
public static int randomInt(int lo, int hi) {
        return (Math.abs(random.nextInt()) % (hi - lo + 1)) + lo;
    }
986877
public void plusHours(long delta)
    {
        if (delta != 0)
        {
            long result = getHour() + delta;
            setHour((int) Math.floorMod(result, 24));
            plusDays(Math.floorDiv(result, 24));
        }
    }