docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct UniformSampler

    Returns uniformly distributed random values within a designated range.

    Implements
    ISampler
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: UnityEngine.Experimental.Perception.Randomization.Samplers
    Assembly: solution.dll
    Syntax
    [Serializable]
    public struct UniformSampler : ISampler

    Constructors

    Name Description
    UniformSampler(float, float, uint)

    Constructs a new uniform distribution sampler

    Properties

    Name Description
    baseSeed

    The base seed used to initialize this sampler's state

    range

    A range bounding the values generated by this sampler

    state

    The current random state of this sampler

    Methods

    Name Description
    IterateState(int)

    Deterministically offsets a sampler's state

    ResetState()

    Resets a sampler's state to its base random seed

    Sample()

    Generates one sample

    Samples(int, out JobHandle)

    Schedules a job to generate an array of samples

    In This Article
    Back to top
    Copyright © 2024 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)