mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-13 14:56:29 -04:00
fixed some findbugs issues
This commit is contained in:
parent
ff4a3eb8e7
commit
9f56f7b37a
@ -430,6 +430,22 @@ public class Model {
|
||||
return name.compareTo(o.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Signal signal = (Signal) o;
|
||||
|
||||
return name.equals(signal.name);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return name.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
|
@ -93,7 +93,7 @@ public class GraphicSVG implements Graphic, Closeable {
|
||||
public void drawCircle(Vector p1, Vector p2, Style style) {
|
||||
try {
|
||||
Vector c = p1.add(p2).div(2);
|
||||
double r = Math.abs(p2.sub(p1).x) / 2;
|
||||
double r = Math.abs(p2.sub(p1).x) / 2.0;
|
||||
if (style.isFilled())
|
||||
w.write("<circle cx=\"" + c.x + "\" cy=\"" + c.y + "\" r=\"" + r + "\" stroke=\"" + getColor(style) + "\" stroke-width=\"" + getStrokeWidth(style) + "\" fill=\"" + getColor(style) + "\" />\n");
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user