mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-18 17:34:43 -04:00
added proper rounding in VectorFloat.java
This commit is contained in:
parent
c845be7976
commit
083cd8db2e
@ -28,12 +28,12 @@ public class VectorFloat implements VectorInterface {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getX() {
|
public int getX() {
|
||||||
return (int) x;
|
return Math.round(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getY() {
|
public int getY() {
|
||||||
return (int) y;
|
return Math.round(y);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -54,7 +54,7 @@ public class VectorFloat implements VectorInterface {
|
|||||||
/**
|
/**
|
||||||
* Subtracts the given vector
|
* Subtracts the given vector
|
||||||
*
|
*
|
||||||
* @param sub the vector zo subtract
|
* @param sub the vector to subtract
|
||||||
* @return the new vector
|
* @return the new vector
|
||||||
*/
|
*/
|
||||||
public VectorFloat sub(VectorInterface sub) {
|
public VectorFloat sub(VectorInterface sub) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user