Ejemplo n.º 1
0
        private bool IsFuncValueEqualTo0(Point A, Point B = null)
        {
            if (B == null)
            {
                return(false);
            }

            var result = MathUtility.Abs(Func.GetValue(A) - Func.GetValue(B));

            return(result <= Epsilon2);
        }
Ejemplo n.º 2
0
        static void ScaleToOne(MenuCommand hCommand)
        {
            if (!(hCommand.context is GameObject hGameObject) ||
                !hGameObject.TryGetComponent(out RectTransform hRect))
            {
                return;
            }

            Vector3 vScale = hRect.localScale;

            hRect.sizeDelta *= MathUtility.Abs(vScale);
            hRect.localScale = MathUtility.ToOne(vScale);
        }