docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SingleExtensions

    Extension methods for Single and Double.

    Inheritance
    object
    SingleExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public static class SingleExtensions

    Methods

    ToStringWithVariableDecimalCount(double, CultureInfo)

    Returns a string representation of the value with a variable number of decimal places.

    Declaration
    public static string ToStringWithVariableDecimalCount(this double val, CultureInfo cultureInfo)
    Parameters
    Type Name Description
    double val

    The value to convert.

    CultureInfo cultureInfo

    The culture info to use.

    Returns
    Type Description
    string

    A string representation of the value with a variable number of decimal places.

    ToStringWithVariableDecimalCount(float, CultureInfo)

    Returns a string representation of the value with a variable number of decimal places.

    Declaration
    public static string ToStringWithVariableDecimalCount(this float val, CultureInfo cultureInfo)
    Parameters
    Type Name Description
    float val

    The value to convert.

    CultureInfo cultureInfo

    The culture info to use.

    Returns
    Type Description
    string

    A string representation of the value with a variable number of decimal places.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)