Replaced assertion with proper exception in Vector.java

This commit is contained in:
Elias Naur 2004-08-20 08:58:50 +00:00
parent 309ef6b06e
commit 68e4faf560
1 changed files with 20 additions and 22 deletions

View File

@ -87,10 +87,8 @@ public abstract class Vector implements Serializable, ReadableVector {
if (len != 0.0f) {
float l = 1.0f / len;
return scale(l);
} else {
assert false;
return this;
}
} else
throw new IllegalStateException("Zero length vector");
}