Implement Cloneable for all primitive wrappers
This commit is contained in:
1 parent
1e52d6ef82
commit
71e7265858
9 files changed
+100
-9
No files matched your search
@@ -5,7 +5,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* 4D vector (often used to store floating-point colors)
|
||||
*/
|
||||
public final class ImVec4 {
|
||||
public final class ImVec4 implements Cloneable {
|
||||
public float x;
|
||||
public float y;
|
||||
public float z;
|
||||
@@ -14,6 +14,13 @@ public final class ImVec4 {
|
||||
public ImVec4() {
|
||||
}
|
||||
|
||||
public ImVec4(final ImVec4 imVec4) {
|
||||
this.x = imVec4.x;
|
||||
this.y = imVec4.y;
|
||||
this.z = imVec4.z;
|
||||
this.w = imVec4.w;
|
||||
}
|
||||
|
||||
public ImVec4(final float x, final float y, final float z, final float w) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
@@ -47,4 +54,9 @@ public final class ImVec4 {
|
||||
public int hashCode() {
|
||||
return Objects.hash(x, y, z, w);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImVec4 clone() {
|
||||
return new ImVec4(this);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user