Small white _unity engine _random

Source: Internet
Author: User
Tags random seed

1         floatf = random.value;//returns a random number between 0.0--1.0 inclusive (read-only)2 3Vector3 vec3 = Random.insideunitsphere;//returns a random point within a sphere with a radius of 14Vector3 vec3_2 = Random.onunitsphere;//returns a random point on a sphere with a radius of 15 6Vector2 vec2 = random.insideunitcircle;//returns a random point within a circle with a radius of 17 8quaternion qua = random.rotation;//returns a random rotation angle9qua = Random.rotationuniform;//returns a random rotation angle (evenly distributed) multiple random number distributions will be more uniformTen          floatF1 = Random.range (Ten, -);//returns a random number, a random number of int, float, between 10-20 One  A  -Random.seed = A;//set the seed for the random number generator -         //to set different random seed seeds the         ///to set the seed of a random number: -         ///different seeds produce different sequences of random numbers -         ///for the same seed, the sequence is the same every time the program starts -Random.seed =1;//after seed has been set, the sequence of random numbers produced below is the same for each +           for(inti =0; I <Ten; i++) -          { + Debug.Log (random.value); A}

Small white _unity engine _random

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.