269 {
271 value.X = objectPosition.X - cameraPosition.X;
272 value.Y = objectPosition.Y - cameraPosition.Y;
273 value.Z = objectPosition.Z - cameraPosition.Z;
274 float num =
value.LengthSquared();
275 if (num < 0.0001f)
276 {
278 }
279 else
280 {
282 }
283 Vector3.Cross(ref cameraUpVector, ref
value, out var result2);
284 result2.Normalize();
286 result.M11 = result2.X;
287 result.M12 = result2.Y;
288 result.M13 = result2.Z;
289 result.M14 = 0f;
290 result.M21 = result3.X;
291 result.M22 = result3.Y;
292 result.M23 = result3.Z;
293 result.M24 = 0f;
294 result.M31 =
value.X;
295 result.M32 =
value.Y;
296 result.M33 =
value.Z;
297 result.M34 = 0f;
298 result.M41 = objectPosition.X;
299 result.M42 = objectPosition.Y;
300 result.M43 = objectPosition.Z;
301 result.M44 = 1f;
302 }
static double Sqrt(double d)