mrtk_developmentreleases/2.0.0releases/2.1.0releases/2.2.0

    Show / Hide Table of Contents

    Class InscribedRectangleTests

    Inheritance
    Object
    InscribedRectangleTests
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.MixedReality.Toolkit.Tests.EditMode.Boundary
    Assembly: cs.temp.dll.dll
    Syntax
    public class InscribedRectangleTests

    Methods

    TestDegenerateSailboat()

    This test case exists to validate the fix for https://github.com/microsoft/MixedRealityToolkit-Unity/issues/7171

    Declaration
    public void TestDegenerateSailboat()
    Remarks

    In particular, this issue used an incorrect Math.min where Math.max was needed, cutting down the candidate search space for rectangles. This rough ASCII art shows how the issue comes about:

    ####### ######### ########### ############# ############### ################# ################### ##################### ####################### ######################### ########################### #############################

    #############################

    In this 'room', notice that the largest inscribed rectangle is actually the one on top. However, because of the issue in #7171, the candidate search space was being reduced to only the bottom space. As a result, before the fix for that, we would return the size of the bottom rectangle (which is incorrect - it's the one on top).

    TestSimpleRectangle()

    Declaration
    public void TestSimpleRectangle()

    TestSimpleSquare()

    Declaration
    public void TestSimpleSquare()
    In This Article
    • Class InscribedRectangleTests
      • Methods
        • TestDegenerateSailboat()
    Back to top Generated by DocFX