AdaptiveShell
    Preparing search index...

    Class Size

    A Size, essentially a 2D Vector.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    • Create a new Size instance.

      Parameters

      • width: number = 0

        The width.

      • height: number = 0

        The height.

      Returns Size

      const size = new Size(10, 20);
      

    Properties

    height: number = 0

    The height.

    width: number = 0

    The width.

    Accessors

    Methods

    • Get the height.

      Returns number

      The height.

    • Get the width.

      Returns number

      The width.

    • Set the height.

      Parameters

      • height: number

        The height.

      Returns void

      size.setZ(10);
      
    • Set the width.

      Parameters

      • width: number

        The width.

      Returns void

      size.setX(10);
      
    • Creates a new Size instance from an object with width and height properties.

      Parameters

      • obj: { height: number; width: number }

        The object containing width and height properties.

      Returns Size

      A new Size instance.