U3D notes (2)

Source: Internet
Author: User

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/1053353c9-0.png "title =" QQ20130825222719.png "/> 1: value: Generate 0 ~ 1 Float number includes 0 and 1)

Ii. Range: Number of custom Range classes generated

Note:

Var $ value: float;

$ Value = Random. value;


Var $ myInt: int;

Var $ myFloat: float;

$ MyInt = Random. Range (1,100 );

$ MyFloat = Random. Range (0, 0, 10.0 );



We can see that the Value property produces 0 ~ 1 random Float count

In addition, Range is divided into the case where int and Float are generated:

①: Int-"can produce the minimum value, but cannot generate the maximum value

②: Float-"can produce a minimum value or a maximum value.

In addition, the Range parameter must be consistent with the generated return type parameter.


This article is from the "Better_Power_Wisdom" blog, please be sure to keep this source http://aonaufly.blog.51cto.com/3554853/1282508

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.