/* Class268 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */

public class Class268 {
	float[] aFloatArray4147;
	Class277[] aClass277Array4148 = new Class277[4];
	float aFloat4149;

	void method5311(int i, Class277 class277) {
		((Class268) this).aClass277Array4148[i].method5441(class277);
		method5312();
	}

	void method5312() {
		((Class268) this).aFloat4149 = -1.0F;
		((Class268) this).aFloatArray4147 = null;
	}

	double[] method5313(float f) {
		double[] ds = new double[3];
		float f_0_ = f * f;
		float f_1_ = f_0_ * f;
		double d = (double) (3.0F * (((Class268) this).aClass277Array4148[1].aFloat4209 - (((Class268) this).aClass277Array4148[0].aFloat4209)));
		double d_2_ = ((double) (3.0F * (((Class268) this).aClass277Array4148[2].aFloat4209 - (((Class268) this).aClass277Array4148[1].aFloat4209))) - d);
		double d_3_ = ((double) (((Class268) this).aClass277Array4148[3].aFloat4209 - ((Class268) this).aClass277Array4148[0].aFloat4209) - d - d_2_);
		ds[0] = (d_3_ * (double) f_1_ + d_2_ * (double) f_0_ + d * (double) f + (double) ((Class268) this).aClass277Array4148[0].aFloat4209);
		d = (double) (3.0F * (((Class268) this).aClass277Array4148[1].aFloat4211 - (((Class268) this).aClass277Array4148[0].aFloat4211)));
		d_2_ = (double) (3.0F * (((Class268) this).aClass277Array4148[2].aFloat4211 - (((Class268) this).aClass277Array4148[1].aFloat4211))) - d;
		d_3_ = ((double) (((Class268) this).aClass277Array4148[3].aFloat4211 - ((Class268) this).aClass277Array4148[0].aFloat4211) - d - d_2_);
		ds[1] = (d_3_ * (double) f_1_ + d_2_ * (double) f_0_ + d * (double) f + (double) ((Class268) this).aClass277Array4148[0].aFloat4211);
		d = (double) (3.0F * (((Class268) this).aClass277Array4148[1].aFloat4213 - (((Class268) this).aClass277Array4148[0].aFloat4213)));
		d_2_ = (double) (3.0F * (((Class268) this).aClass277Array4148[2].aFloat4213 - (((Class268) this).aClass277Array4148[1].aFloat4213))) - d;
		d_3_ = ((double) (((Class268) this).aClass277Array4148[3].aFloat4213 - ((Class268) this).aClass277Array4148[0].aFloat4213) - d - d_2_);
		ds[2] = (d_3_ * (double) f_1_ + d_2_ * (double) f_0_ + d * (double) f + (double) ((Class268) this).aClass277Array4148[0].aFloat4213);
		return ds;
	}

	Class277 method5314(int i) {
		return ((Class268) this).aClass277Array4148[i];
	}

	double[] method5315(float f) {
		double[] ds = new double[3];
		float f_4_ = f * f;
		float f_5_ = f_4_ * f;
		double d = (double) (3.0F * (((Class268) this).aClass277Array4148[1].aFloat4209 - (((Class268) this).aClass277Array4148[0].aFloat4209)));
		double d_6_ = ((double) (3.0F * (((Class268) this).aClass277Array4148[2].aFloat4209 - (((Class268) this).aClass277Array4148[1].aFloat4209))) - d);
		double d_7_ = ((double) (((Class268) this).aClass277Array4148[3].aFloat4209 - ((Class268) this).aClass277Array4148[0].aFloat4209) - d - d_6_);
		ds[0] = (d_7_ * (double) f_5_ + d_6_ * (double) f_4_ + d * (double) f + (double) ((Class268) this).aClass277Array4148[0].aFloat4209);
		d = (double) (3.0F * (((Class268) this).aClass277Array4148[1].aFloat4211 - (((Class268) this).aClass277Array4148[0].aFloat4211)));
		d_6_ = (double) (3.0F * (((Class268) this).aClass277Array4148[2].aFloat4211 - (((Class268) this).aClass277Array4148[1].aFloat4211))) - d;
		d_7_ = ((double) (((Class268) this).aClass277Array4148[3].aFloat4211 - ((Class268) this).aClass277Array4148[0].aFloat4211) - d - d_6_);
		ds[1] = (d_7_ * (double) f_5_ + d_6_ * (double) f_4_ + d * (double) f + (double) ((Class268) this).aClass277Array4148[0].aFloat4211);
		d = (double) (3.0F * (((Class268) this).aClass277Array4148[1].aFloat4213 - (((Class268) this).aClass277Array4148[0].aFloat4213)));
		d_6_ = (double) (3.0F * (((Class268) this).aClass277Array4148[2].aFloat4213 - (((Class268) this).aClass277Array4148[1].aFloat4213))) - d;
		d_7_ = ((double) (((Class268) this).aClass277Array4148[3].aFloat4213 - ((Class268) this).aClass277Array4148[0].aFloat4213) - d - d_6_);
		ds[2] = (d_7_ * (double) f_5_ + d_6_ * (double) f_4_ + d * (double) f + (double) ((Class268) this).aClass277Array4148[0].aFloat4213);
		return ds;
	}

	Class268() {
		for (int i = 0; i < 4; i++)
			((Class268) this).aClass277Array4148[i] = new Class277();
		method5312();
	}

	float method5316(float f) {
		if (((Class268) this).aFloat4149 == -1.0F)
			method5317();
		if (f <= 0.0F)
			return 0.0F;
		if (f >= ((Class268) this).aFloat4149)
			return 1.0F;
		float f_8_ = 0.0F;
		float f_9_ = ((Class268) this).aFloatArray4147[0];
		for (int i = 1; i < ((Class268) this).aFloatArray4147.length; i++) {
			if (f < f_9_) {
				float f_10_ = (f - f_8_) / (f_9_ - f_8_);
				float f_11_ = ((float) (i - 1) / (float) ((Class268) this).aFloatArray4147.length);
				float f_12_ = ((float) i / (float) ((Class268) this).aFloatArray4147.length);
				return f_11_ + (f_12_ - f_11_) * f_10_;
			}
			f_8_ = f_9_;
			f_9_ += ((Class268) this).aFloatArray4147[i];
		}
		float f_13_ = (f - f_8_) / (f_9_ - f_8_);
		float f_14_ = ((float) (((Class268) this).aFloatArray4147.length - 1) / (float) ((Class268) this).aFloatArray4147.length);
		return f_14_ + (1.0F - f_14_) * f_13_;
	}

	void method5317() {
		int i = 20;
		double[] ds = method5315(0.0F);
		float f = 0.0F;
		Class277 class277 = Class277.method5433();
		for (int i_15_ = 1; i_15_ <= i; i_15_++) {
			double[] ds_16_ = method5315((float) i_15_ / (float) i);
			class277.aFloat4209 = (float) (ds_16_[0] - ds[0]);
			class277.aFloat4211 = (float) (ds_16_[1] - ds[1]);
			class277.aFloat4213 = (float) (ds_16_[2] - ds[2]);
			f += class277.method5455();
			ds = ds_16_;
		}
		int i_17_ = (int) (f / 20.0F);
		if (i_17_ < i)
			i_17_ = i;
		((Class268) this).aFloatArray4147 = new float[i_17_];
		ds = method5315(0.0F);
		float f_18_ = 0.0F;
		for (int i_19_ = 1; i_19_ <= i_17_; i_19_++) {
			double[] ds_20_ = method5315((float) i_19_ / (float) i_17_);
			class277.aFloat4209 = (float) (ds_20_[0] - ds[0]);
			class277.aFloat4211 = (float) (ds_20_[1] - ds[1]);
			class277.aFloat4213 = (float) (ds_20_[2] - ds[2]);
			float f_21_ = class277.method5455();
			f_18_ += f_21_;
			((Class268) this).aFloatArray4147[i_19_ - 1] = f_21_;
			ds = ds_20_;
		}
		((Class268) this).aFloat4149 = f_18_;
	}

	Class277 method5318(int i) {
		return ((Class268) this).aClass277Array4148[i];
	}

	void method5319(int i, Class277 class277) {
		((Class268) this).aClass277Array4148[i].method5441(class277);
		method5312();
	}

	float method5320() {
		if (((Class268) this).aFloat4149 == -1.0F)
			method5317();
		return ((Class268) this).aFloat4149;
	}

	void method5321(int i, Class277 class277) {
		((Class268) this).aClass277Array4148[i].method5441(class277);
		method5312();
	}

	Class277 method5322(int i) {
		return ((Class268) this).aClass277Array4148[i];
	}

	Class277 method5323(int i) {
		return ((Class268) this).aClass277Array4148[i];
	}

	float method5324(float f) {
		if (((Class268) this).aFloat4149 == -1.0F)
			method5317();
		if (f <= 0.0F)
			return 0.0F;
		if (f >= ((Class268) this).aFloat4149)
			return 1.0F;
		float f_22_ = 0.0F;
		float f_23_ = ((Class268) this).aFloatArray4147[0];
		for (int i = 1; i < ((Class268) this).aFloatArray4147.length; i++) {
			if (f < f_23_) {
				float f_24_ = (f - f_22_) / (f_23_ - f_22_);
				float f_25_ = ((float) (i - 1) / (float) ((Class268) this).aFloatArray4147.length);
				float f_26_ = ((float) i / (float) ((Class268) this).aFloatArray4147.length);
				return f_25_ + (f_26_ - f_25_) * f_24_;
			}
			f_22_ = f_23_;
			f_23_ += ((Class268) this).aFloatArray4147[i];
		}
		float f_27_ = (f - f_22_) / (f_23_ - f_22_);
		float f_28_ = ((float) (((Class268) this).aFloatArray4147.length - 1) / (float) ((Class268) this).aFloatArray4147.length);
		return f_28_ + (1.0F - f_28_) * f_27_;
	}

	float method5325(float f) {
		if (((Class268) this).aFloat4149 == -1.0F)
			method5317();
		if (f <= 0.0F)
			return 0.0F;
		if (f >= ((Class268) this).aFloat4149)
			return 1.0F;
		float f_29_ = 0.0F;
		float f_30_ = ((Class268) this).aFloatArray4147[0];
		for (int i = 1; i < ((Class268) this).aFloatArray4147.length; i++) {
			if (f < f_30_) {
				float f_31_ = (f - f_29_) / (f_30_ - f_29_);
				float f_32_ = ((float) (i - 1) / (float) ((Class268) this).aFloatArray4147.length);
				float f_33_ = ((float) i / (float) ((Class268) this).aFloatArray4147.length);
				return f_32_ + (f_33_ - f_32_) * f_31_;
			}
			f_29_ = f_30_;
			f_30_ += ((Class268) this).aFloatArray4147[i];
		}
		float f_34_ = (f - f_29_) / (f_30_ - f_29_);
		float f_35_ = ((float) (((Class268) this).aFloatArray4147.length - 1) / (float) ((Class268) this).aFloatArray4147.length);
		return f_35_ + (1.0F - f_35_) * f_34_;
	}

	double[] method5326(float f) {
		double[] ds = new double[3];
		float f_36_ = f * f;
		float f_37_ = f_36_ * f;
		double d = (double) (3.0F * (((Class268) this).aClass277Array4148[1].aFloat4209 - (((Class268) this).aClass277Array4148[0].aFloat4209)));
		double d_38_ = ((double) (3.0F * (((Class268) this).aClass277Array4148[2].aFloat4209 - (((Class268) this).aClass277Array4148[1].aFloat4209))) - d);
		double d_39_ = ((double) (((Class268) this).aClass277Array4148[3].aFloat4209 - ((Class268) this).aClass277Array4148[0].aFloat4209) - d - d_38_);
		ds[0] = (d_39_ * (double) f_37_ + d_38_ * (double) f_36_ + d * (double) f + (double) ((Class268) this).aClass277Array4148[0].aFloat4209);
		d = (double) (3.0F * (((Class268) this).aClass277Array4148[1].aFloat4211 - (((Class268) this).aClass277Array4148[0].aFloat4211)));
		d_38_ = (double) (3.0F * (((Class268) this).aClass277Array4148[2].aFloat4211 - (((Class268) this).aClass277Array4148[1].aFloat4211))) - d;
		d_39_ = ((double) (((Class268) this).aClass277Array4148[3].aFloat4211 - ((Class268) this).aClass277Array4148[0].aFloat4211) - d - d_38_);
		ds[1] = (d_39_ * (double) f_37_ + d_38_ * (double) f_36_ + d * (double) f + (double) ((Class268) this).aClass277Array4148[0].aFloat4211);
		d = (double) (3.0F * (((Class268) this).aClass277Array4148[1].aFloat4213 - (((Class268) this).aClass277Array4148[0].aFloat4213)));
		d_38_ = (double) (3.0F * (((Class268) this).aClass277Array4148[2].aFloat4213 - (((Class268) this).aClass277Array4148[1].aFloat4213))) - d;
		d_39_ = ((double) (((Class268) this).aClass277Array4148[3].aFloat4213 - ((Class268) this).aClass277Array4148[0].aFloat4213) - d - d_38_);
		ds[2] = (d_39_ * (double) f_37_ + d_38_ * (double) f_36_ + d * (double) f + (double) ((Class268) this).aClass277Array4148[0].aFloat4213);
		return ds;
	}

	float method5327() {
		if (((Class268) this).aFloat4149 == -1.0F)
			method5317();
		return ((Class268) this).aFloat4149;
	}

	float method5328() {
		if (((Class268) this).aFloat4149 == -1.0F)
			method5317();
		return ((Class268) this).aFloat4149;
	}

	void method5329(int i, Class277 class277) {
		((Class268) this).aClass277Array4148[i].method5441(class277);
		method5312();
	}

	void method5330() {
		((Class268) this).aFloat4149 = -1.0F;
		((Class268) this).aFloatArray4147 = null;
	}

	void method5331() {
		int i = 20;
		double[] ds = method5315(0.0F);
		float f = 0.0F;
		Class277 class277 = Class277.method5433();
		for (int i_40_ = 1; i_40_ <= i; i_40_++) {
			double[] ds_41_ = method5315((float) i_40_ / (float) i);
			class277.aFloat4209 = (float) (ds_41_[0] - ds[0]);
			class277.aFloat4211 = (float) (ds_41_[1] - ds[1]);
			class277.aFloat4213 = (float) (ds_41_[2] - ds[2]);
			f += class277.method5455();
			ds = ds_41_;
		}
		int i_42_ = (int) (f / 20.0F);
		if (i_42_ < i)
			i_42_ = i;
		((Class268) this).aFloatArray4147 = new float[i_42_];
		ds = method5315(0.0F);
		float f_43_ = 0.0F;
		for (int i_44_ = 1; i_44_ <= i_42_; i_44_++) {
			double[] ds_45_ = method5315((float) i_44_ / (float) i_42_);
			class277.aFloat4209 = (float) (ds_45_[0] - ds[0]);
			class277.aFloat4211 = (float) (ds_45_[1] - ds[1]);
			class277.aFloat4213 = (float) (ds_45_[2] - ds[2]);
			float f_46_ = class277.method5455();
			f_43_ += f_46_;
			((Class268) this).aFloatArray4147[i_44_ - 1] = f_46_;
			ds = ds_45_;
		}
		((Class268) this).aFloat4149 = f_43_;
	}
}
