A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 5 years ago

need a check on this function that it fails... :( var g = setInterval('rotateMe',speed) function rotateMe() { x = |length| Math.cos(t) y = |length| Math.sin(t) plot = 'position:absolute; top:y; left:x' document.getElementById('img').position = plot t = t+angle of rotation {

  • This Question is Closed
  1. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    that function is to make a cannon rotate over a dat.

  2. nowhereman
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Although I think this is not the correct study group for this question, I'll try to answer: 0. I hope I'm correct that it is javascript 1. you should end your commands with semicola (;) 2. What is |length|? Do you mean Math.abs(length)*? 3. It should be ...getElementById('img').style.position = plot; 4. You need to declare t and length as global variables 5. The end of the function must be } not {.

  3. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    non o i used 0 prograaming language in this its just the algorithm ^^ but if u want i can paste cods here too (if i can find the file on pc :D )

  4. nowhereman
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    The algorithm seems ok, for me it's a question of clean implementation.

  5. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    hmmm

  6. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    well i found codes but i wrote them in C# and its not a whole, that my function only gives new values, i made a new class for this rotation ^^

  7. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    well, Ill try to reprogram it ^^

  8. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.