Project

General

Profile

Bug #463

Bob Rotate corrupting certain sums and displaying incorrectly.

Added by David Baldwin over 3 years ago. Updated over 3 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
#1

Updated by David Baldwin over 3 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.

#2

Updated by Brian Flanagan over 3 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.

#3

Updated by Francois Lionet over 3 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. :)

#4

Updated by Brian Flanagan over 3 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```
#5

Updated by David Baldwin over 3 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF