<commit_before>package com.haxademic.core.math.easing;

import com.haxademic.core.app.P;

public class LinearFloat 
implements IEasingValue {

	public float value;
	public float target;
	public float inc;
	public int delay;
	
	protected boolean complete = false;
	protected IEasingValueDelegate delegate;

	public LinearFloat(float value, float inc) {
		this(value, inc, null);
	}
	
	public LinearFloat(float value, float inc, IEasingValueDelegate delegate) {
		this.value = value;
		this.target = value;
		this.inc = inc;
		this.delegate = delegate;
		delay = 0;
	}
	
	public float value() {
		return value;
	}
	
	public float target() {
		return target;
	}
	
	public float inc() {
		return inc;
	}
	
	public void setCurrent(float value) {
		this.value = value;
	}
	
	public void setTarget(float target) {
		this.target = target;
		if(target != value) complete = false;
	}
	
	public void setInc(float inc) {
		this.inc = inc;
	}
	
	public void setDelay(int frames) {
		this.delay = frames;
	}
	
	// mask to be swappable with EasingFloat
	public void update(boolean bool) {
		update();
	}
	
	public boolean isComplete() {
		return value == target;
	}
	
	public void update() {
		if( delay > 0 ) { delay--; return; }
		if( value != target ) {
			boolean passedTarget = false;
			if( value < target ) {
				value += inc;
				if( value > target ) passedTarget = true;
			} else {
				value -= inc;
				if( value < target ) passedTarget = true;
			}
			if(passedTarget == true) {
				value = target;
				if(delegate != null) checkComplete();
			}
		}
	}
	
	protected void checkComplete() {
		if(complete == false && value == target) {
			complete = true;
			delegate.complete(this);
		}
	}

}
	<commit_msg>Update LinearFloat.java<commit_after>package com.haxademic.core.math.easing;

public class LinearFloat 
implements IEasingValue {

	public float value;
	public float target;
	public float inc;
	public int delay;
	
	protected boolean complete = false;
	protected IEasingValueDelegate delegate;

	public LinearFloat(float value, float inc) {
		this(value, inc, null);
	}
	
	public LinearFloat(float value, float inc, IEasingValueDelegate delegate) {
		this.value = value;
		this.target = value;
		this.inc = inc;
		this.delegate = delegate;
		delay = 0;
	}
	
	public float value() {
		return value;
	}
	
	public float target() {
		return target;
	}
	
	public float inc() {
		return inc;
	}
	
	public void setCurrent(float value) {
		this.value = value;
	}
	
	public void setTarget(float target) {
		this.target = target;
		if(target != value) complete = false;
	}
	
	public void setInc(float inc) {
		this.inc = inc;
	}
	
	public void setDelay(int frames) {
		this.delay = frames;
	}
	
	// mask to be swappable with EasingFloat
	public void update(boolean bool) {
		update();
	}
	
	public boolean isComplete() {
		return value == target;
	}
	
	public void update() {
		if( delay > 0 ) { delay--; return; }
		if( value != target ) {
			boolean passedTarget = false;
			if( value < target ) {
				value += inc;
				if( value > target ) passedTarget = true;
			} else {
				value -= inc;
				if( value < target ) passedTarget = true;
			}
			if(passedTarget == true) {
				value = target;
				if(delegate != null) checkComplete();
			}
		}
	}
	
	protected void checkComplete() {
		if(complete == false && value == target) {
			complete = true;
			delegate.complete(this);
		}
	}

}
	
{'fraction_non_alphanumeric': 0.11479289940828402, 'fraction_numerical': 0.001183431952662722, 'mean_word_length': 3.0833333333333335, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5390369', 'n_tokens_mistral': 1266, 'n_tokens_neox': 1083, 'n_words': 323}