Commit c125b9c1 authored by Berenger Bramas's avatar Berenger Bramas

Remove epsilon

parent 395ae248
......@@ -185,7 +185,7 @@ static void GenericInner(ContainerClass* const FRestrict inTargets){
ComputeClass dy = ty - ComputeClass(&sourcesY[idxSource]);
ComputeClass dz = tz - ComputeClass(&sourcesZ[idxSource]);
ComputeClass inv_square_distance = mOne / (dx*dx + dy*dy + dz*dz + std::numeric_limits<FReal>::epsilon());
ComputeClass inv_square_distance = mOne / (dx*dx + dy*dy + dz*dz);
const ComputeClass inv_distance = inv_square_distance.sqrt();
inv_square_distance *= inv_distance;
......@@ -221,7 +221,7 @@ static void GenericInner(ContainerClass* const FRestrict inTargets){
FReal dy = targetsY[idxTarget] - targetsY[idxSource];
FReal dz = targetsZ[idxTarget] - targetsZ[idxSource];
FReal inv_square_distance = FReal(1.0) / (dx*dx + dy*dy + dz*dz + std::numeric_limits<FReal>::epsilon());
FReal inv_square_distance = FReal(1.0) / (dx*dx + dy*dy + dz*dz);
const FReal inv_distance = FMath::Sqrt(inv_square_distance);
inv_square_distance *= inv_distance;
......@@ -282,7 +282,7 @@ static void GenericFullRemote(ContainerClass* const FRestrict inTargets, const C
ComputeClass dy = ty - ComputeClass(&sourcesY[idxSource]);
ComputeClass dz = tz - ComputeClass(&sourcesZ[idxSource]);
ComputeClass inv_square_distance = mOne / (dx*dx + dy*dy + dz*dz + std::numeric_limits<FReal>::epsilon());
ComputeClass inv_square_distance = mOne / (dx*dx + dy*dy + dz*dz);
const ComputeClass inv_distance = inv_square_distance.sqrt();
inv_square_distance *= inv_distance;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment