// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using Microsoft.MixedReality.Toolkit.UI; using System.Collections.Generic; namespace Microsoft.MixedReality.Toolkit.Utilities { /// /// Defines a comparer to sort TransformConstraints by their /// requested execution order, or any other priority /// mechanism that a subclass utilizes. /// internal class ConstraintExecOrderComparer : IComparer { /// /// Returns < 0 if x should be executed first. /// Returns > 0 if y should be executed first. /// Returns = 0 if they are of equivalent execution priority. /// public virtual int Compare(TransformConstraint x, TransformConstraint y) { return x.ExecutionPriority - y.ExecutionPriority; } } }