简体   繁体   中英

What is the difference between a float and a double in maya?

In Maya, when using the setAttr() command, we can use float and double as a variable type. What is the difference? The example in the documentation is the same one.

-type float3

Array of three floats
Value Syntax    float float float
Value Meaning   value1 value2 value3
Mel Example     setAttr node.float3Attr -type float3 1.1 2.2 3.3;
Python Example  cmds.setAttr('node.float3Attr',1.1,2.2,3.3,type='float3')

-type double3

Array of three doubles
Value Syntax    double double double
Value Meaning   value1 value2 value3
Mel Example     setAttr node.double3Attr -type double3 1.1 2.2 3.3;
Python Example  cmds.setAttr('node.double3Attr',1.1,2.2,3.3,type='double3')

http://download.autodesk.com/global/docs/maya2014/en_us/CommandsPython/index.html

Thank you!

Floating point numbers are 32 bit. Double floating point numbers are 64 bit

Doubles can hold a larger and more precise number.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM