-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96a6c52
commit ab81fc9
Showing
2 changed files
with
11 additions
and
7 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
using System; | ||
using Godot; | ||
|
||
namespace GoDough.Visuals.Extensions { | ||
public static class Vector3Extensions { | ||
namespace GoDough.Visuals.Extensions | ||
{ | ||
public static class Vector3Extensions | ||
{ | ||
|
||
public static Vector3 CopyWith( | ||
this Vector3 source, | ||
Nullable<float> x, | ||
Nullable<float> x = null, | ||
Nullable<float> y = null, | ||
Nullable<float> z = null) { | ||
Nullable<float> z = null) | ||
{ | ||
return new Vector3( | ||
x ?? source.X, | ||
y ?? source.Y, | ||
z ?? source.Z); | ||
} | ||
|
||
public static Vector3 Copy( | ||
this Vector3 source) { | ||
return source.CopyWith(null); | ||
public static Vector3 Copy( | ||
this Vector3 source) | ||
{ | ||
return source.CopyWith(); | ||
} | ||
} | ||
} |