docs.unity.cn
    Show / Hide Table of Contents

    Method Scale

    Scale(Single)

    Returns a float2x2 matrix representing a uniform scaling of both axes by s.

    Declaration
    public static float2x2 Scale(float s)
    Parameters
    Type Name Description
    Single s

    The scaling factor.

    Returns
    Type Description
    float2x2

    The float2x2 matrix representing uniform scale by s.

    Scale(Single, Single)

    Returns a float2x2 matrix representing a non-uniform axis scaling by x and y.

    Declaration
    public static float2x2 Scale(float x, float y)
    Parameters
    Type Name Description
    Single x

    The x-axis scaling factor.

    Single y

    The y-axis scaling factor.

    Returns
    Type Description
    float2x2

    The float2x2 matrix representing a non-uniform scale.

    Scale(float2)

    Returns a float2x2 matrix representing a non-uniform axis scaling by the components of the float2 vector v.

    Declaration
    public static float2x2 Scale(float2 v)
    Parameters
    Type Name Description
    float2 v

    The float2 containing the x and y axis scaling factors.

    Returns
    Type Description
    float2x2

    The float2x2 matrix representing a non-uniform scale.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, March 29, 2022
    Terms of use