src/model/Chunk.java
public void step(long baseTime, long newTime){
		Set<Entity> copy = new HashSet<>(entities);
		for(Entity e: copy) {
			Vector acc = new Vector();
			Vector pos = e.getPosition();
			for (Planet p : planetInfluences) {
				if (!p.equals(e)) {
					acc.change(p.getEq().evaluate(pos));

				}
			}
			e.applyAcc(acc);
			e.step((Math.min((newTime - baseTime), World.tickTime) / 1e3));
			if (!inBound(e)) {
				entities.remove(e);
				world.moved(e);
			}
		}
	}
/**
	 * Apply the changes to this chunk(and all entities contained within) based on the difference between two given times.
	 * @param baseTime
	 * @param newTime
	 */
Apply the changes to this chunk(and all entities contained within) based on the difference between two given times.
@param baseTime
@param newTime
Apply the changes to this chunk ( and all entities contained within ) based on the difference between two given times . @param baseTime @param newTime
public void step(long baseTime, long newTime){
		Set<Entity> copy = new HashSet<>(entities);
		for(Entity e: copy) {
			Vector acc = new Vector();
			Vector pos = e.getPosition();
			for (Planet p : planetInfluences) {
				if (!p.equals(e)) {
					acc.change(p.getEq().evaluate(pos));
				}
			}
			e.applyAcc(acc);
			e.step((Math.min((newTime - baseTime), World.tickTime) / 1e3));
			if (!inBound(e)) {
				entities.remove(e);
				world.moved(e);
			}
		}
	}
public void step ( long baseTime , long newTime ) { Set < Entity > copy = new HashSet < > ( entities ) ; for ( Entity e : copy ) { Vector acc = new Vector ( ) ; Vector pos = e . getPosition ( ) ; for ( Planet p : planetInfluences ) { if ( ! p . equals ( e ) ) { acc . change ( p . getEq ( ) . evaluate ( pos ) ) ; } } e . applyAcc ( acc ) ; e . step ( ( Math . min ( ( newTime - baseTime ) , World . tickTime ) / 1e3 ) ) ; if ( ! inBound ( e ) ) { entities . remove ( e ) ; world . moved ( e ) ; } } }
Apply the changes to this chunk(and all entities contained within) based on the difference between two given times.
Apply the changes to this chunk ( and all entities contained within ) based on the difference between two given times .