Jump to content

LeGalactique

Members
  • Content count

    4
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About LeGalactique

  • Rank
    Peon

Personal Information

  • Name
    Jean Garcia
  • Location
    Dominican Republic
  1. Beginner VEX Excercise Modulo

    Ok will do that, thx!
  2. Beginner VEX Excercise Modulo

    I had done this before but still wasn't getting it, I appreciate your help alot and I think I understood now entirely. What I didn't get was why if I did (@ptnum = a) then I could color all numbers from 1-9 between each 10th increase. Since I am a beginner I was failing to understand the difference between == equal to and = asign or can be asigned. Also I was thinking of the modulo remainder and failing to grasp how those values translated to houdini, when you just see it as a loop and see that the loop is 1-9 then every tenth is 0 or basically nothing and that cannot be assigned as a value to ptnum hence you can pinpoint that to add a value. This is how I have come to understand it, needed to really know what happened basically.
  3. Beginner VEX Excercise Modulo

    Hey thanks! So basically when I say: if (@ptnum = a) //I still don't get why this works on my first code. I was doing things backwards? I mean I can use this to tell Houdini that all numbers not 0 will be one color, so I should have written: if (@ptnum != a) That was the part I didn't catch, it is all based on any number that doesn't have a remainder right? Something like: if (@ptnum %10 == 0) { @Cd = {1,0,0}; }
  4. Beginner VEX Excercise Modulo

    Hi all, I am fairly new to VEX and currently on day 12 of joy of vex, I was trying to do this excercise: "Highlight red all the points where their ptnum can be cleanly divided by 10" Someone recommended to use modulo and I did find a way to make it work but honestly I do not entirely understand why it works, if anyone can help me understand this better I would appreciate it. I understand modulo is basically the remainder of a division and that in this case it will loop from 0,1,2,3,4,5,6,7,8,9,0 through @ptnum. int a = @ptnum % 10 ; if (@ptnum = a) { @Cd.r = 1; } else { @Cd.g = 0; @Cd.b = 0; }
×