Project

General

Profile

Actions

Bug #463

closed

Bob Rotate corrupting certain sums and displaying incorrectly.

Added by David Baldwin over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
High
Target version:
Start date:
09/03/2020
Due date:
% Done:

0%

Estimated time:
1:00 h
Affected version:

Description

Bob Rotate is corrupting certain sums and displaying incorrectly, namely addition and subtraction. In the attached example, you can try 4 different Bob Rotate commands that should rotate the Bob through 90 degrees. You will see that the addition and subtraction ones don't.


Files

BobRotateBug.aozip (175 KB) BobRotateBug.aozip David Baldwin, 09/03/2020 06:32 PM
Actions #1

Updated by David Baldwin over 4 years ago

I've found what the problem is. In degree mode, in the command Bob Rotate 1,a+b , a is treated as a radian and b as degrees. This can be proved by trying the line Bob Rotate 1,6.283+360. The result is the bob doesn't rotate.

Actions #2

Updated by Brian Flanagan over 4 years ago

  • Priority changed from Normal to High
  • Estimated time set to 1:00 h
  • Affected version changed from 0.9.9.4-RC1 to Beta RC2

Verified this is a problem.
Using a variable works fine, putting a constant in an expression is a problem.

Actions #3

Updated by Francois Lionet about 4 years ago

  • Status changed from New to Resolved
  • Target version set to Beta RC4

Fixed! Missing brackets in instruction definitions.
I also corrected the same problem for sprites and screens. :)

Actions #4

Updated by Brian Flanagan about 4 years ago

  • Status changed from Resolved to Feedback

The sums are calculated correctly now with 9 Oct updates!

...but, why does it appear that a positive (clockwise) rotation angle rotates in the negative (counter-clockwise) direction? (Francois, see private comments I left you on Discord.)

Example:

Palette 0,$FFFFFF,$777777
Cls 0 : Curs Off
Degree
Message$="This is a test"
L=16*Len(Message$)
Locate 0,0:Print Message$
Get Bob 1,0,0 To L,32
Get Bob 2,0,0 To L,32
Hot Spot 1,$11
I$="1"
angle=0
cls 0

Locate 8,3 : Print "It seems like these should be reversed."
do
    Locate 13,4 : Print Using "Angle -#####";angle
    Locate 30,4 : Print Using "Angle -#####";-angle
    Bob 1,300,300,1     : Bob 2,560,300,1
    Bob Rotate 1,angle  : Bob Rotate 2,-angle
    Wait 0.01
    angle=angle+2
Loop```
Actions #5

Updated by David Baldwin about 4 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF