mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-10 10:40:54 +00:00
visual/VisualStim: flip rotations to reflect psychopy convention
The documentation for `setOri()` on `VisualStim` now accurately reflects the mapping of negative values to counter-clockwise rotations and vice versa.
This commit is contained in:
parent
08972dae90
commit
f12ccafff3
@ -101,9 +101,9 @@ export class VisualStim extends util.mix(MinimalStim).with(WindowMixin)
|
||||
*/
|
||||
setOri(ori, log = false)
|
||||
{
|
||||
this._setAttribute('ori', ori, log);
|
||||
this._setAttribute('ori', -ori, log);
|
||||
|
||||
let radians = ori * 0.017453292519943295;
|
||||
let radians = -ori * 0.017453292519943295;
|
||||
this._rotationMatrix = [[Math.cos(radians), -Math.sin(radians)],
|
||||
[Math.sin(radians), Math.cos(radians)]];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user