fix errors in how vector projection is calculated

This commit is contained in:
sgold@sonic.net 2017-01-14 01:15:31 -08:00
parent 6493337477
commit d4cd3f916d
2 changed files with 1084 additions and 1084 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009-2012 jMonkeyEngine
* Copyright (c) 2009-2017 jMonkeyEngine
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -317,7 +317,7 @@ public final class Vector4f implements Savable, Cloneable, java.io.Serializable
public Vector4f project(Vector4f other){
float n = this.dot(other); // A . B
float d = other.lengthSquared(); // |B|^2
return new Vector4f(other).normalizeLocal().multLocal(n/d);
return new Vector4f(other).multLocal(n/d);
}
/**