Uploaded image for project: 'Snowstorm'
  1. Snowstorm
  2. STORM-1315

As a User, I want to be able to do simple math in numeric edit fields.

    Details

    • Type: Story
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Sprint 19
    • Labels:
      None
    • Environment:
      -
    • Test Plan:
      Hide

      Set-up

      • A single test user running STORM-1315 PO viewer and a region/parcel with build enabled.
      • Rez a single default cube prim on the ground.

      Test Steps

      1. Normal spinner control behavior
        1. Alter the test prim's params using spinners.
        2. Use up/down buttons to modify values.
        3. Enter numbers in to spinners' line entry.
        4. Attempt to input letter in to spinners' line entry and commit (press enter or move focus away from that spinner).
      • Verify spinners work as expected and that only numbers will be accepted. Letters should be allowed to be inputted but upon commit the original value should replace the input.
      1. Simple equations
        1. Enter '1+1' in to any param's spinner line entry and commit.
        2. Repeat above with other arithmetic functions:
        • + addition
        • - subtraction
        • * multiplication
        • / division
        • ^ power
        • -n (negative input)
      • Verify that result of each is correct.
      1. Error handling
        1. Enter '1+invalid'
      • Verify the original value replaces the invalid input.
      1. Test Functions
        1. Test each of the fallowing supported functions. All functions use the c++ supplied functions of the same name.
        • SIN(a)
        • COS(a)
        • TAN(a)
        • ASIN(a)
        • ACOS(a)
        • ATAN(a)
        • SQRT(a)
        • LOG(a)
        • EXP(a)
        • ABS(a) : fabs
        • FLR(a) : llfloor
        • CEIL(a) : llceil
        • ATAN2(a,b)
        • MIN(a,b) : llmin
        • MAX(a,b) : llmax
      • Verify each returns correct results.
      1. Test Constants
        1. Input each constant
        • PI = 3.1415926535897932384626433832795
        • TWO_PI = 6.283185307179586476925286766559
        • PI_BY_TWO = 1.5707963267948966192313216916398
        • SQRT_TWO_PI = 2.506628274631000502415765284811
        • SQRT2 = 1.4142135623730950488016887242097
        • SQRT3 = 1.73205080756888288657986402541
        • DEG_TO_RAD = 0.017453292519943295769236907684886
        • RAD_TO_DEG = 57.295779513082320876798154814105
        • GRAVITY = -9.8
      • Verify that each is evaluated to the proper value.
      1. Test Variables
        1. Edit the test object and enter an unique value in each param.
        2. Use each of the supported variables in an expression. Any variable can be used in any input on the build floater, not just the input for the param the variable represents.
        3. The prim type will need to be changed to access some of the prim params.
        • PX: pos x
        • PY: pos y
        • PZ: pos z
        • SX: scale x
        • SY: scale y
        • SZ: scale z
        • RX: rot x
        • RY: rot y
        • RZ: rot z
        • HLW: hallow
        • CB: cut begin
        • CE: cut end
        • PB: path cut begin
        • PE: path but end
        • TB: twist begin
        • TE: twist end
        • SHX: shear x
        • SHY: shear y
        • TPX: taper x
        • TPY: taper y
        • ROF: radius offset
        • REV: revolutions
        • SKW: skew
        • HLX: hole x
        • HLY: hole y
        • TSU: texture u scale
        • TSV: texture v scale
        • TOU: texture u offset
        • TOV: texture v offset
        • TROT: texture rotation
        • TRNS: texture transparency
        • GLOW: texture glow
      • Verify the outcome of each is correct.
        1. Example: enter 'sx+1' in to Scale Y should result in prim's Y scale being 1m larger than its X scale.
      1. Test Grouping
        1. Input '(1+1)*2'.
        2. Input other equations using grouping, including multiple and nested groups.
        3. Tested signed groups, '-(expression)'.
      • Verify outcome is 4, the others are correct, and the order of operations is fallowed.

      I believe I covered all supported functions of this patch.

      Show
      Set-up A single test user running STORM-1315 PO viewer and a region/parcel with build enabled. Rez a single default cube prim on the ground. Test Steps Normal spinner control behavior Alter the test prim's params using spinners. Use up/down buttons to modify values. Enter numbers in to spinners' line entry. Attempt to input letter in to spinners' line entry and commit (press enter or move focus away from that spinner). Verify spinners work as expected and that only numbers will be accepted. Letters should be allowed to be inputted but upon commit the original value should replace the input. Simple equations Enter '1+1' in to any param's spinner line entry and commit. Repeat above with other arithmetic functions: + addition - subtraction * multiplication / division ^ power -n (negative input) Verify that result of each is correct. Error handling Enter '1+invalid' Verify the original value replaces the invalid input. Test Functions Test each of the fallowing supported functions. All functions use the c++ supplied functions of the same name. SIN(a) COS(a) TAN(a) ASIN(a) ACOS(a) ATAN(a) SQRT(a) LOG(a) EXP(a) ABS(a) : fabs FLR(a) : llfloor CEIL(a) : llceil ATAN2(a,b) MIN(a,b) : llmin MAX(a,b) : llmax Verify each returns correct results. Test Constants Input each constant PI = 3.1415926535897932384626433832795 TWO_PI = 6.283185307179586476925286766559 PI_BY_TWO = 1.5707963267948966192313216916398 SQRT_TWO_PI = 2.506628274631000502415765284811 SQRT2 = 1.4142135623730950488016887242097 SQRT3 = 1.73205080756888288657986402541 DEG_TO_RAD = 0.017453292519943295769236907684886 RAD_TO_DEG = 57.295779513082320876798154814105 GRAVITY = -9.8 Verify that each is evaluated to the proper value. Test Variables Edit the test object and enter an unique value in each param. Use each of the supported variables in an expression. Any variable can be used in any input on the build floater, not just the input for the param the variable represents. The prim type will need to be changed to access some of the prim params. PX: pos x PY: pos y PZ: pos z SX: scale x SY: scale y SZ: scale z RX: rot x RY: rot y RZ: rot z HLW: hallow CB: cut begin CE: cut end PB: path cut begin PE: path but end TB: twist begin TE: twist end SHX: shear x SHY: shear y TPX: taper x TPY: taper y ROF: radius offset REV: revolutions SKW: skew HLX: hole x HLY: hole y TSU: texture u scale TSV: texture v scale TOU: texture u offset TOV: texture v offset TROT: texture rotation TRNS: texture transparency GLOW: texture glow Verify the outcome of each is correct. Example: enter 'sx+1' in to Scale Y should result in prim's Y scale being 1m larger than its X scale. Test Grouping Input '(1+1)*2'. Input other equations using grouping, including multiple and nested groups. Tested signed groups, '-(expression)'. Verify outcome is 4, the others are correct, and the order of operations is fallowed. I believe I covered all supported functions of this patch.

      Description

      As a User, I want to be able to do simple math in numeric edit fields.

      Example:
      An object is at postion X = 10.254.

      You want to move it by 2.358 meters in the x direction.

      Type "+2.358" after "10.254" in the object's X position field and press enter.

      The sum of the two numbers appears in the edit field and the object moves to that postion.

      We can do this in the design program I use at work and I use it a lot.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                suezannec.baskerville SuezanneC Baskerville
                Prod Owner Approved:
                Esbee Linden
                Extended Group Visibility:
                jira-users
              • Watchers:
                15 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: