Difference between revisions of "How to Use Embedded Math in VTube Float Point Edit Boxes"
From ATTWiki
(→Symbols, Constants, and Functions) |
(→Symbols, Constants, and Functions) |
||
(3 intermediate revisions by one user not shown) | |||
Line 229: | Line 229: | ||
| style="text-align: center; background-color:#9aff99;" | atan(0) | | style="text-align: center; background-color:#9aff99;" | atan(0) | ||
| style="text-align: center; background-color:#ffffff;" | 0 | | style="text-align: center; background-color:#ffffff;" | 0 | ||
+ | | | ||
+ | |- | ||
+ | | style="text-align: center; background-color:#dae8fc;" | ArcLength | ||
+ | | | ||
+ | | style="text-align: center; background-color:#ffffff;" | Calculate arc length of a bend. The parameters are ANGLE, RADIUS. | ||
+ | | | ||
+ | | style="text-align: center; background-color:#9aff99;" | ArcLength(90,1.5) | ||
+ | | style="text-align: center; background-color:#ffffff;" | 2.356 | ||
| | | | ||
|- | |- | ||
| style="text-align: center; background-color:#dae8fc;" | TriangleBaseA | | style="text-align: center; background-color:#dae8fc;" | TriangleBaseA | ||
| | | | ||
− | | style="text-align: center; background-color:#ffffff;" | Calculate the adjacent base of a right triangle with the angle and the hypotenuse length | + | | style="text-align: center; background-color:#ffffff;" | Calculate the adjacent base of a right triangle with the angle and the hypotenuse length. The parameters are ANGLE, HYPOTENUSE LENGTH. |
| | | | ||
| style="text-align: center; background-color:#9aff99;" | TriangleBaseA(5,10) | | style="text-align: center; background-color:#9aff99;" | TriangleBaseA(5,10) | ||
Line 241: | Line 249: | ||
| style="text-align: center; background-color:#dae8fc;" | TriangleBaseB | | style="text-align: center; background-color:#dae8fc;" | TriangleBaseB | ||
| | | | ||
− | | style="text-align: center; background-color:#ffffff;" | Calculate the opposing base of a right triangle with the angle and the hypotenuse length | + | | style="text-align: center; background-color:#ffffff;" | Calculate the opposing base of a right triangle with the angle and the hypotenuse length. The parameters are ANGLE, HYPOTENUSE LENGTH. |
| | | | ||
| style="text-align: center; background-color:#9aff99;" | TriangleBaseB(5,10) | | style="text-align: center; background-color:#9aff99;" | TriangleBaseB(5,10) | ||
Line 249: | Line 257: | ||
| style="text-align: center; background-color:#dae8fc;" | Length2D | | style="text-align: center; background-color:#dae8fc;" | Length2D | ||
| | | | ||
− | | style="text-align: center; background-color:#ffffff;" | Length between 2D points | + | | style="text-align: center; background-color:#ffffff;" | Length between 2D points. The parameters are two X,Y points -like (x1,y1,x2,y2) |
| | | | ||
| style="text-align: center; background-color:#9aff99;" | Length2D(0,0,5,5) | | style="text-align: center; background-color:#9aff99;" | Length2D(0,0,5,5) | ||
Line 257: | Line 265: | ||
| style="text-align: center; background-color:#dae8fc;" | Length3D | | style="text-align: center; background-color:#dae8fc;" | Length3D | ||
| | | | ||
− | | style="text-align: center; background-color:#ffffff;" | Length between 3D points | + | | style="text-align: center; background-color:#ffffff;" | Length between 3D points. The parameters are two X,Y,Z points -like (x1,y1,z1,x2,y2,z2) |
| | | | ||
| style="text-align: center; background-color:#9aff99;" | Length3D(0,0,0,10,10,10) | | style="text-align: center; background-color:#9aff99;" | Length3D(0,0,0,10,10,10) | ||
Line 265: | Line 273: | ||
| style="text-align: center; background-color:#dae8fc;" | Area | | style="text-align: center; background-color:#dae8fc;" | Area | ||
| | | | ||
− | | style="text-align: center; background-color:#ffffff;" | The area in a rectangle | + | | style="text-align: center; background-color:#ffffff;" | The area in a rectangle. The parameters are Length and Width - like (10,5) |
| | | | ||
| style="text-align: center; background-color:#9aff99;" | Area(10,5)) | | style="text-align: center; background-color:#9aff99;" | Area(10,5)) |
Latest revision as of 21:47, 10 February 2020
This article shows how to use embedded math functions in VTube float point edit boxes.
|
- Back to VTube-LASER
- Back to VTube-STEP
Contents |
The Floating Point Edit Box Embedded Calculator
As of version 3, VTube-STEP and VTube-LASER includes an embedded calculator in the floating point edit boxes anywhere in the main user interface.
See this example of how it works.
This is the tube before the change. |
|
Choose the LL value in the LRA grid. |
|
Subtract 5.2 like this: |
|
The VTube calculator returns the result in the edit box like this: |
|
Now reverse-calc the data and this is the new tube. |
Symbols, Constants, and Functions
Symbol | Description | Entry Example | Result of Example Entry | |||
---|---|---|---|---|---|---|
+ | Add | 1+1 | 2 | |||
- | Subtract | 9-5 | 4 | |||
* | Multiply | 3*6 | 18 | |||
/ | Divide | 3/8 | 0.375 | |||
\ | Integer divide by | 9/2 | 4 | |||
! | Factorial | 5! | 120 | |||
( ) | Nesting Parenthesis | 2 * (5+4) | 18 | |||
mod | Modulo (remainder) | 7 mod 4 | 3 | |||
^ | Raised to the power of | 4 ^ 5 | 1024 | |||
Sqr | Find the square root | sqr(64) | 8 | |||
Int | Truncate to an integer | int(6.8) | 6 | |||
Frac | Fractional part | frac(6.8) | 0.8 | |||
Abs | Absolute value | abs(-8) | 8 | |||
Pi | The constant value for Pi | pi | 3.141592653 | |||
Cos | Cosine | cos(pi) | -1 | |||
Sin | Sine | sin(pi/2) | 1 | |||
Tan | Tangent | tan(1) | 1.5575 | |||
Atan | Arc tangent | atan(0) | 0 | |||
ArcLength | Calculate arc length of a bend. The parameters are ANGLE, RADIUS. | ArcLength(90,1.5) | 2.356 | |||
TriangleBaseA | Calculate the adjacent base of a right triangle with the angle and the hypotenuse length. The parameters are ANGLE, HYPOTENUSE LENGTH. | TriangleBaseA(5,10) | 9.961947 | |||
TriangleBaseB | Calculate the opposing base of a right triangle with the angle and the hypotenuse length. The parameters are ANGLE, HYPOTENUSE LENGTH. | TriangleBaseB(5,10) | 0.871557 | |||
Length2D | Length between 2D points. The parameters are two X,Y points -like (x1,y1,x2,y2) | Length2D(0,0,5,5) | ||||
Length3D | Length between 3D points. The parameters are two X,Y,Z points -like (x1,y1,z1,x2,y2,z2) | Length3D(0,0,0,10,10,10) | 17.321 | |||
Area | The area in a rectangle. The parameters are Length and Width - like (10,5) | Area(10,5)) | 50 |
Other Pages
- See VTube-LASER
- See VTube-STEP