Help with understanding specific command

Official forum for open source FreePIE discussion and development.
Post Reply
MeteorFalling2
One Eyed Hopeful
Posts: 42
Joined: Thu Dec 08, 2016 10:23 pm

Help with understanding specific command

Post by MeteorFalling2 »

So I spent a lot of time trying to decode one of my favorite GlovePIE scripts relating to wiimote gyro-mouse.

So far I have condensed the code into several lines that are easy to understand. The only thing I do not understand is one command, which is the " *|var.wmSpeed| " reference. However, I understand what the var.wmSpeed means.

Could someone help me understand this? I'm trying to find code alternatives in FreePIE, but this seems to be the last code I cannot interpret.

Code: Select all


var.wmSpeedYaw = wiimote.MotionPlus.RawYawSpeed/ 120

var.wmSpeedPitch = wiimote.MotionPlus.RawPitchSpeed/120

var.wmSpeed = [ var.wmSpeedYaw, -var.wmSpeedPitch ]


[ var.wmRollFix_x, var.wmRollFix_y ] = [ sin(atan2(var.wmSpeedYaw, -var.wmSpeedPitch)), cos(atan2(var.wmSpeedYaw, -var.wmSpeedPitch)) ] * |var.wmSpeed|



MeteorFalling2
One Eyed Hopeful
Posts: 42
Joined: Thu Dec 08, 2016 10:23 pm

Re: Help with understanding specific command

Post by MeteorFalling2 »

I have finally found out the meaning of |var.wmSpeed|. It means absolute value.
Post Reply

Return to “FreePIE”