VectorExtension.cs 370 B

1234567891011121314
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace JTSystems
  5. {
  6. public static class VectorExtension
  7. {
  8. public static Vector3 With(this Vector3 original, float? x = null, float? y = null, float? z = null)
  9. {
  10. return new Vector3(x ?? original.x, y ?? original.y, z ?? original.z);
  11. }
  12. }
  13. }