Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Commit

Permalink
Added .editorconfig to help keep project in compliance with coding gu…
Browse files Browse the repository at this point in the history
…idelines (#818)
  • Loading branch information
StephenHodgson committed Apr 21, 2021
1 parent 43fa762 commit 8c2646f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions Runtime/Extensions/UnityObjectExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static class UnityObjectExtensions
public static void DontDestroyOnLoad(this Object @object)
{
#if UNITY_EDITOR
// ReSharper disable once EnforceIfStatementBraces
if (UnityEditor.EditorApplication.isPlaying)
#endif
Object.DontDestroyOnLoad(@object);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,12 @@ protected override void SetPointInternal(int pointIndex, Vector3 point)
localOffset = Vector3.zero;
// If we're using local tangent points, apply this change to control point 2
if (useLocalTangentPoints)
{
localOffset = point - controlPoints.Point1;
}

controlPoints.Point1 = point;
controlPoints.Point2 = controlPoints.Point2 + localOffset;
controlPoints.Point2 += localOffset;
break;
case 1:
controlPoints.Point2 = point;
Expand All @@ -164,7 +166,7 @@ protected override void SetPointInternal(int pointIndex, Vector3 point)
}

controlPoints.Point4 = point;
controlPoints.Point3 = controlPoints.Point3 + localOffset;
controlPoints.Point3 += localOffset;
break;
}
}
Expand Down Expand Up @@ -195,4 +197,4 @@ protected override Vector3 GetUpVectorInternal(float normalizedLength)
return transform.up;
}
}
}
}
4 changes: 3 additions & 1 deletion Runtime/Utilities/MathUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,9 @@ public static Vector3 NearestPointToLinesRANSAC(List<Ray> rays, int ransac_itera
for (int ind = 0; ind < rays.Count; ++ind)
{
if (DistanceOfPointToLine(rays[ind], testPoint) < ransac_threshold)
{
++numInliersForIteration;
}
}

// remember best
Expand Down Expand Up @@ -454,4 +456,4 @@ public static float GetAngleBetween(Vector2 pointA, Vector2 pointB)
return MathUtilities.RadiansToDegrees(Mathf.Atan2(diff.y, diff.x));
}
}
}
}
6 changes: 3 additions & 3 deletions Tests/Services/ITestExtensionDataProvider1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace XRTK.Tests.Services
{
interface ITestExtensionDataProvider1 : IMixedRealityExtensionDataProvider, ITestService { }
internal interface ITestExtensionDataProvider1 : IMixedRealityExtensionDataProvider, ITestService { }

interface ITestExtensionDataProvider2 : IMixedRealityExtensionDataProvider, ITestService { }
}
internal interface ITestExtensionDataProvider2 : IMixedRealityExtensionDataProvider, ITestService { }
}

0 comments on commit 8c2646f

Please sign in to comment.