Example #1
0
		Vec3 Vec3::Normalize(Vec3 vec) {
			float length = vec.Distance();

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

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

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

			return ret;
		}