Esempio n. 1
0
		Vec3 Vec3::Normalize(Vec3 vec) {
			float length = vec.Distance();

			vec.x /= length;
			vec.y /= length;
			vec.z /= length;

			return vec;
		}
Esempio n. 2
0
		Vec3 Vec3::Normalize() {
			Vec3 ret = *this;
			float length = ret.Distance();

			ret.x /= length;
			ret.y /= length;
			ret.z /= length;

			return ret;
		}