daily uodate on 20240411 by nitload youmu, camera complete
This commit is contained in:
@@ -43,18 +43,16 @@ namespace StgSharp.Math
|
||||
|
||||
public static unsafe void Normalize(ref vec3d source, ref vec3d target)
|
||||
{
|
||||
Vector4 s = source.vec;
|
||||
Vector4 t = target.vec;
|
||||
|
||||
s = Vector4.Normalize(s);
|
||||
|
||||
float dotProduct = Vector4.Dot(s, t);
|
||||
Vector4 projection = Vector4.Multiply(s, t);
|
||||
Vector3 s = source.v;
|
||||
Vector3 t = target.v;
|
||||
|
||||
s = Vector3.Normalize(s);
|
||||
Vector3 projection = Vector3.Dot(t, s) / Vector3.Dot(s, s) * s;
|
||||
t -= projection;
|
||||
t = Vector3.Normalize(t);
|
||||
|
||||
source.vec = s;
|
||||
target.vec = t;
|
||||
source.v = s;
|
||||
target.v = t;
|
||||
}
|
||||
|
||||
public static vec4d Normalize(vec4d vec)
|
||||
|
||||
Reference in New Issue
Block a user