Search Results for

    Show / Hide Table of Contents

    Class LinearScale

    A class that converts between two linear ranges.

    Inheritance
    Object
    LinearScale
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: AudioAnalysisTools.Scales
    Assembly: AudioAnalysisTools.dll
    Syntax
    public class LinearScale

    Constructors

    | Improve this Doc View Source

    LinearScale((Double Low, Double High), (Double Low, Double High))

    Initializes a new instance of the LinearScale class.

    Declaration
    public LinearScale((double Low, double High) domain, (double Low, double High) range)
    Parameters
    Type Name Description
    (T1, T2)<Double, Double> domain

    The range to consider the domain (the input).

    (T1, T2)<Double, Double> range

    The range to consider the range (the output).

    Remarks

    Should be able to handle mapping a domain where x1 ≤ x < x2 to a range where y1 > y ≥ y2 (an inverted mapping).

    | Improve this Doc View Source

    LinearScale((Double Low, Double High), (Double Low, Double High), Boolean)

    Declaration
    public LinearScale((double Low, double High) domain, (double Low, double High) range, bool clamp)
    Parameters
    Type Name Description
    (T1, T2)<Double, Double> domain
    (T1, T2)<Double, Double> range
    Boolean clamp

    Whether or not to clamp the values to the end points.

    Remarks

    If clamp is true then round-tripping of values is not supported.

    Methods

    | Improve this Doc View Source

    From(Double)

    Converts a value from the range into its domain equivalent.

    Declaration
    public double From(double y)
    Parameters
    Type Name Description
    Double y

    The range value.

    Returns
    Type Description
    Double

    The equivalent domain value.

    | Improve this Doc View Source

    FromMagnitude(Double)

    Converts a range magnitude into a domain magnitude.

    Declaration
    public double FromMagnitude(double yMagnitude)
    Parameters
    Type Name Description
    Double yMagnitude

    The range magnitude.

    Returns
    Type Description
    Double

    The equivalent domain magnitude.

    | Improve this Doc View Source

    To(Double)

    Converts a value from the domain into its range equivalent.

    Declaration
    public double To(double x)
    Parameters
    Type Name Description
    Double x

    The domain value.

    Returns
    Type Description
    Double

    The equivalent range value.

    | Improve this Doc View Source

    ToMagnitude(Double)

    Converts a domain magnitude into a range magnitude.

    Declaration
    public double ToMagnitude(double xMagnitude)
    Parameters
    Type Name Description
    Double xMagnitude

    The domain magnitude.

    Returns
    Type Description
    Double

    The equivalent range magnitude.

    Extension Methods

    ObjectExtensions.NotNull(Object)
    ObjectExtensions.AsArray<T>(T)
    ObjectExtensions.AsList<T>(T)
    ObjectExtensions.Wrap<T>(T)
    SystemExtensions.BinarySerialize(Object)
    ConfigFileExtensions.NotNull(Object, FileInfo, String, String)
    ConfigFileExtensions.ValidateNotNull(Object, String, String)
    ConfigFileExtensions.ValidateLessThan<T>(Object, Nullable<T>, String, Nullable<T>, String, String)
    ExtensionsXml.SerializeObject<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Generated by DocFX AP docs version: 21.7.0.4-master-e26127a50d7bd7472d47288f10e61014fb981f7f-DIRTY-CI:144 Back to top