added round to Pos3
This commit is contained in:
parent
4a7b57c47f
commit
df39865c3d
@ -96,4 +96,12 @@ abstract Pos3(Vec3<Float>) from Vec3<Float> to Vec3<Float>{
|
||||
public function toString():String {
|
||||
return 'Pos3(${this.x}, ${this.y}, ${this.z})';
|
||||
}
|
||||
|
||||
public function round():Pos3 {
|
||||
return new Pos3({
|
||||
x: Math.fround(this.x),
|
||||
y: Math.fround(this.y),
|
||||
z: Math.fround(this.z)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user