Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 02:20:07 +01:00
Add positive() to Vector and Vector2D
Dieser Commit ist enthalten in:
Ursprung
85cdd49593
Commit
0346228310
@ -575,6 +575,15 @@ public class Vector {
|
||||
return new Vector(Math.floor(x + 0.5), Math.floor(y + 0.5), Math.floor(z + 0.5));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a vector with the absolute values of the components of this vector.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Vector positive() {
|
||||
return new Vector(Math.abs(x), Math.abs(y), Math.abs(z));
|
||||
}
|
||||
|
||||
/**
|
||||
* 2D transformation.
|
||||
*
|
||||
|
@ -501,6 +501,15 @@ public class Vector2D {
|
||||
return new Vector2D(Math.floor(x + 0.5), Math.floor(z + 0.5));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a vector with the absolute values of the components of this vector.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Vector2D positive() {
|
||||
return new Vector2D(Math.abs(x), Math.abs(z));
|
||||
}
|
||||
|
||||
/**
|
||||
* 2D transformation.
|
||||
*
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren