A stupid MATH problem

Hello and thanks for entering this topic,
I'm sure you can help me in my problem. I'm writing a soccer game,and I have just started to edit the flight of the ball,but I have a shameful problem. I want to calculate the null points of a parabola,but I don't know how JAVA calculates the extraction of a root. Is there any operator for that?
If yes,please let me know
BYE:AWEXcg

If you want it to handle anything like a real football, you'll need to bring in some fluid dynamics. At the very least you'll want a basic Bernoulli effect implementation. There's a great article on football dynamics at http://physicsweb.org/article/world/11/6/8

Similar Messages

  • Looking for an Alarm Clock app where you do math problems to turn it off

    Someone told me of an application for the iPhone that is an alarm clock in which you can use a mode that, when the alarm sounds, you need to solve a math problem or other visual test in order to cease the alarm. That way the user is more awake by the time the alarm is stopped. Sounds annoying, yes, but would be just what I need.
    Anyone know which alarm app this is? Or if it even exists?

    There's another app that got a lot of press recently called *Proactive Sleep*.
    It works similarly to the math app mentioned above but you do a 30 second visual game when you wake up. It also records your score as well as your sleep patterns and can give you recommendations and other feedback to improve your sleeping habits.

  • Getting the top left corner of a grid cell (math problem)

    I'm making a map editor for a tile based game. The editor makes a grid:
    private function drawGrid():void {
                var grid:Sprite = new Sprite();
                var tileSize:uint= 50;
                for(var i:int=0;i<row;i++)
                    grid.graphics.lineStyle(1,0x000000,0.3);
                    grid.graphics.moveTo(0, i*tileSize);
                    grid.graphics.lineTo(700, i*tileSize);
                for(var j:int=0;j<column;j++)
                    grid.graphics.lineStyle(1,0x000000,0.3);
                    grid.graphics.moveTo(j*tileSize, 0);
                    grid.graphics.lineTo(j*tileSize, 400);
                stage.addChild(grid);
    And when the user clicks anywhere in the screen a movieclip is added to stage. The movieclip (exported for actionscript as Tile) should be placed in the top left corner of the grid cell.
    private function placeTile(mouseX:int, mouseY:int, frame:uint):void {
                var tile:Tile = new Tile();
                tile.gotoAndStop(frame);
                tile.x = PROBLEM HERE
                tile.y = PROBLEM HERE
                stage.addChild(tile);
    How can I do that? I came up with an idea but it didn't work because I have a math problem.  Let's pretend that the user mouse is at position mouseX = 456:
    I could remove the hundreds and use the quotient 56 and check if it is above 50. If it is above 50 I would place it at x = 500 if not I would place it at x = 450. How can I remove the hundreds? Do you have a better idea?
    Message was edited by: wilsonsilva7 because unconsciously I pressed ctrl+s (to save) and the message was posted

    Thanks. I asked a friend and he told me about the %but I still had a problem. Your expression solved my problem
            private function placeTile(mouseX:int, mouseY:int, frame:uint):void {
                var tile:Tile = new Tile();
                tile.gotoAndStop(frame);
                tile.x = Math.floor(mouseX / tileSize) * tileSize;
                tile.y = Math.floor(mouseY / tileSize) * tileSize;
                stage.addChild(tile);
    That way every tile is centered every 50 pixels

  • Strange math-problem with LabVIEW 7.1

    Hello!
    I am using LabVIEW 7.1 and I came to this strange math-problem. Could it be that it is a problem of LabVIEW 7.1?
    Ok try this with LabVIEW 7.1:
    open a new VI
    place a subtract-VI (pallet numerical) on the block diagram and try to subtract 0.2 from 1.6
    place a less-VI (pallet compare) on the block diagram and wire a numerical constant 1.4 to input x
    wire the result of the subtraction to input y of the comparison
    place an LED to the output of the comparison
    and start this.
    What does it say?
    The LED should turn on and this means here that 1.4 would be less than 1.4 .
    But I would have expected that 1.4 is not less than 1.4 .
    This works also if you add or subtract upto 0.2 to/from the values 1.4 and 1.6 (or equivalent with 0.2) .
    If you change the inputs of the comparison then the result is as expected and 1.4 is reported not to be less than 1.4 .
    If you compare two constants with the same value 1.4 you will not get the same strange result.
    Does anybody have an explanation for this?
    Espelkamper

    Hello,
    For floating point math: Rounding to multiples of 0.1 is problematic as
    those numbers are infinite fractions in base2 representation...
    So maybe you should change your numbers to integers using fixed point math. If all your input values are in the range of 1.4 to 1.8 you can multiply by 10000 and round to next integer. Then do your comparison on that integer (there's also an 'InRange' function in the comparison palette).
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Maths Problem in Action Script 2.0

    Hi surfers,
    We have a problem in Action Script 2.0 to solve the maths equation given below:
    write a code in Action Script 2.0 to solve these two equation.
    Aim: To know the value of "a" in both different equations.
    1. 2a + 5 = 3a + 1
    2. 4a + 3 = 11
    Thanks in Advance.
    Pls give me ASAP, i'm struggle here.

    Hello, you are at the wrong forum. for AS 2.o questions, hop on there: http://forums.adobe.com/community/flash/flash_actionscript
    BTY, people answer when they can, not when you want...

  • Logic for this math problem

    Before I get stinker replies for cross posting , let me tell that , i have been recommended to post this in this forum.
    My problem is such:
    I need to find a logic to implement the following :
    In the floating point number , say , 1.0.. the Integral part will remain constant(1) but the decimal part has to get incremented by 1
    1.1 +0.1
    1.2+0.1
    1.3+0.1
    1.4+0.1
    1.5 +0.1
    1.6+0.1
    1.7+0.1
    1.8+0.1
    1.9+0.1
    1.10+0.1
    1.2... But what I need here is 1.11 ,1.12
    I need my programming logic to detect there needs to be a change in the increment value from 0.1 to 0.01 when I reach 1.1
    and from 0.01 to 0.001 when i reach 1.111..so on,
    please suggest..

    you can't do it with a double,
    since double d = 1.10d; will be treated as 1.1d
    what you can do is treat the double as a String
    public void test(){
    String s1 = "1.9";
    String s2 = "1.10";
    String s3 = "1";
    String s4 = "1.1";
    System.out.println(increment(s1));
    System.out.println(increment(s2));
    System.out.println(increment(s3));
    System.out.println(increment(s4));
    public String increment(String d){
    int pos = d.indexOf(".");
    if (pos != -1){
    if (d.charAt(d.length()-1) == 0)
    return d.substring(0, d.length()-2) +
    ength()-2) + "1";
    String temp = d.substring(pos+1);
    int num = Integer.parseInt(temp);
    num++;
    return d.substring(0, pos+1) + num;
    else
    return d + ".1";
    }gives
    1.10
    1.11
    1.1
    1.2
    I leave it to you to understand the logic...it's to
    get you started..it does not check for all conditions
    of the inputI think it is a Math with algorithm problem. Your solution is good, but you are using String functions so much. There is other solution, handling with numbers only.

  • Why do we run into stupid basic problems with firefox?

    I have jre1.6_u31 installed on a Windows 7 and the brilliant
    firefox keep tell me that I've to install the jre_1.6_u29 missing plugin when I try to run an applet...a simple applet!! The plugin doesn't appear on add-ons manager then i use "check your plugins" and the stupid response is: "For your safety, Firefox has disabled your outdated version of Java. Please upgrade to the latest version."
    Running an applet is basic! Why are u making new versions when older ones are better? I' m sick of running into this stupid problems with firefox! Everything works on ie, chrome and safari but not on Firefox!
    I' m sick of trying to solve firefox basic problems!
    We have a site that has one thousand ore more visits per day...and we only have troubles with firefox! What do I tell the costumers? I' m not going to give them solutions difficult and confusing as usually your solutions are! They are common people not developers as me...they just want the things to work! I gave up and the solution that I give to them now is to stop using firefox and uninstall it. And people ask I chrome is becoming the second most used browser...here is your answer...
    I' m a developer and I've to develop I don't have the time patiente to trying solving basic firefox problems. If you don't know how to solve the problems then stop developing this and save us the headaches.

    Have you updated Java lately? You say you have jre1.6_u31 installed, but "Java(TM) Platform SE 6 U31" is not showing in the Plugins submitted with your question (click "More system details" to the right of your original question post). To enable, Add-ons > Plugins, and enable the item.
    If your OS is 64-bit and you have 32-bit browsers (Firefox) and 64-bit browsers installed, then you need to install both the 32-bit and 64-bit versions of Java.
    *See --> https://www.java.com/en/download/faq/java_win64bit.xml
    '''Older versions of Java blocked in Firefox''' --> https://addons.mozilla.org/en-US/firefox/blocked/p80 <br />
    '''Using/Updating Java''' --> [https://support.mozilla.org/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox] <br />
    '''Unblocking Java''' --> https://support.mozilla.org/en-US/kb/unblocking-java-plugin
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • How can I use superscript in math problems presented on Firefox

    Working in KahnAcademy.org, there are math videos to explain an issue and then trial problems to test learning. In the Pre-Algebra section there are some videos regarding logarithms, To write a logarithm one needs to write a number with its exponent. A 2 for squared, 3 for cubed etc. To write the exponent it should be in superscript.
    I need to be able to write the exponent wherever I write something when within Firefox.

    Sorry, Firefox for Android is not yet compatible with Adobe Flash Player. We've started work to add Flash support, and you can follow our progress on this page: https://wiki.mozilla.org/Fennec/Features/Plugins

  • Math Problem

    I need some help! I admit, I'm not a java guru...far from it, just a college student with a book that doesn't have many examples for what I'm looking for. Any help will be greatly appreciated!!!
    My problem: My java program is to find a root using the Newton-Rapson method. The input is a function, i.e. f(x) = x^2 + x + 2. The program is to prompt the user for the beginning numbers, i.e. 225 and -43, and then find the answer to the nearest hundredth.
    I can do this on paper - no problem, my problem is I don't know enough about Java to program it to do the math.
    Unfortunately, if there are any predefined classes or methods that will do this problem for me, I'm NOT allowed to use them. Every step has to be hard coded. :(
    I'm not sure how to get Java to recognize the + sign or
    the ^ sign or any other non-numeric signs. I know there is something called substring, but I can't seem to find examples where it uses an integer. All the examples I have found are chars (like reading the string "hello"). Not helpful when you are trying to mix integers with symbols.
    Any help offered would be greatly appreciated, and I'm sure would in-turn help me the the bisection algorithm and all the future algorithm's I have to put into a program.
    Thanks for your time.

    [mode=Pedantic] Its Newton-Raphson [mode]
    Anyway use this as a starting point, its from a guy by the name of Neil Broadbent (see: http://www.neiljohan.com/java/ for lots of java samples)
    This will calculate the square root of a number using Newton-Raphson factoring, you can use this as a starting point.
    //Program to calculate the square root of a number using the Newton-Raphson.
    //It stops when the difference between consecutive approximations is less than 0.00005
    //by Neil Broadbent
    import java.io.IOException;
    import NeilClass.*;
    public class NewtonRaphsonClass
         private static boolean debugging = true;
         /** @param tFactorial the value from which to find the square root
          *  precondition tFactorial>0
          *  @return x1 so that x1>0 */
        public static double iSquareRoot (double tFactorial) throws IOException
                double x1=0;
                double x0=tFactorial/2;
                double a=tFactorial;
                boolean finished=false;
         /* check pre-condition */
         if (debugging && (tFactorial<=0)){
              System.out.println("Pre-condition violoated");
              finished=true;
                while (finished==false)
                    x1=(x0+(a/x0))/2;
                    if (x1>x0){
                        if ((x1-x0)<0.00005){
                            finished=true;
                    else if (x0>x1){
                        if ((x0-x1)<0.00005){
                            finished=true;
                    x0=x1;
              /* check post-condition */
              if (debugging && (x1<=0)){
                   System.out.println("Post-condition violoated");
                return x1;
    }

  • Stupid servlet problem!!!

    Hi all,
    I have a very stupid problem. I create and deploy simple servlet
    (StupidServlet). In deployment descriptor I mapped it into
    servlet/StupidServlet URL. Servlet is situated in MyWeb.war. I access it by
    http://my-pc/NASApp/MyWeb/servlet/StupidServlet.
    In init method I receive context (m_context = conf.getServletContext();)
    In service method I make next things:
    servletPathString = req.getServletPath();
    realPathStub = m_context.getRealPath( "/" );
    realPath = m_context.getRealPath( servletPathString );
    And servlet prints results: servletPathString = /servlet/StupidServlet
    realPathStub =
    c:\iplanet\ias6\ias\APPS\MyApp\MyWeb\
    realPath = null (!!!!!)
    Could you describe me where my mistake. May be you have any ideas.
    with regards,
    Andrey Kirienko

    Hi,
    This is from the servlet 2.2 javadoc:
    This method returns null if the servlet container cannot translate the virtual path to a real path for any reason (such as when the content is being made available from a .war archive).
    So, this method is unusefull when using war files.
    Juan

  • Creating a form with a field that contains a simple math problem.

    I am creating a form in Acrobat 9 Standard that contains a field that requires a simple math function (divide).
    if (QuantityRow1 > 0)
    ExtensionRow1 / QuantityRow1
    Take the value input in ExtensionRow1 and divide it by the value in QuantityRow1. I have included an IF statement to prevent an error that occur if QuantityRow1 were equal to zero.
    After inputting the data into the two fields I tab past the field where I expect to see my result and the field remains blank. I don't receive any error messages.
    Any ideas? Thanks - jb

    This is a duplicate of your question on Acrobatusers.com (
    http://answers.acrobatusers.com/Need-simple-math-operation-function-Acrobat-9-Standard-cre ating-form-q142800.aspx
    Did the information provided there not help you with your problem?
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    PDF Software Development, Training and More...
    [email protected]
    http://www.khkonsulting.com

  • For iphone 4gs, i was wondering when they will send out an update that will finally fix the stupid text problem. When ever i open my textes, sometimes it would spaz put or something and wout take 2-3 minutes just to finally be able to see my text

    I would go to my textes and it would take about 30seconds and then crashes, i would close the phone go back and it fail to open again then my phone and the imessages would spaz out. Its really frustrating. I do hard resets and everything but nothing fixes it. When will there be an update that fixes this problem? Plus there are times when i press to close my phone but it doesnt close, i try pressing multiple times after waiting a while a little bit later, it then closes....

    There is no such thing as an iPhone 4GS.
    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these steps in order until the problem is resolved.
    If these steps fail to resolve the issues, take it to Apple for evaluation.

  • A stupid little problem with FORTE

    Hi to everyone,
    I'm using FORTE on windows 2000 but I've a little problem: I can't put the characters {} in the source editor.
    I've tried with the ASCII code (ALT + 123) and with ALTGR+7 but they don't work. How ca I do?
    Thanks

    You can copy the them from where you are able to type them, and then paste them in the editor with ctrl+v. To copy, you can use ctrl+c.

  • AS3 core maths problem

    Hi. If you run the code at the bottom in AS3 you get this:
    0.1
    0.2
    0.30000000000000004
    0.4
    0.5
    0.6
    0.7
    0.7999999999999999
    0.8999999999999999
    0.9999999999999999
    if you run it in AS2 you get
    0.1
    0.2
    0.3
    0.4
    0.5
    0.6
    0.7
    0.8
    0.9
    1
    the as2 version is what you would expect. Anybody know why
    this is?

    hutn.jimbo,
    > Thanks for the reply Rothrock, but that does
    > seem strange. If you add 0.1 to something, it
    > should go up by that.
    In a theoretical sense, of course, you're right. The problem
    isn't with
    your arithmetic ability, but rather with the basic problem of
    how computers
    represent decimal values. I wish I could explain it better
    than that (it
    definitely surprised me when I first saw it), but you do get
    used to it.
    The same output occurs in JavaScript:
    <script>
    var counter = 0;
    for (var i=0; i<10; i++) {
    document.write((counter += 0.1) + "<br />");
    </script>
    > I don't really know how to get the output I'm after,
    > as sometimes you would need to round down and
    > other up.
    I can think of two ways in this scenario. Either multiply
    your value by
    10, round, then divide it by 10 (or whatever decimal place
    makes sense) ...
    var myNum:Number = 0;
    for (var i:Number = 0; i < 10; i++) {
    myNum *= 10;
    myNum += 1;
    myNum /= 10;
    trace(myNum);
    ... which is your only choice (I think) with ActionScript
    2.0. In
    JavaScript, you could use the Number.toFixed() method:
    <script>
    var counter = 0;
    for (var i=0; i<10; i++) {
    document.write((counter += 0.1).toFixed(1) + "<br
    />");
    </script>
    David Stiller
    Co-author, Foundation Flash CS4 for Designers
    http://tinyurl.com/5j55cv
    "Luck is the residue of good design."

  • Stupid annoying problem =/  _root.score += 1; ?

    Such a stupid question, but I can't seem to find the right answer on the Internet and I'm feeling a bit impatient.
    So I have this dynamic text labeled "score" in the var box.
    Then I have a button with the code:
    on (release) {
        _root.score += 1;
    So when you click it, it's +1 score in the score dynamic text box.
    Ok, so it works when it's being published as Version: Flash Player 6 ( Files > Publish Settings > Flash tab )
    But it doesn't work when the version is set as Flash Player 8.
    I'm in a bit of a situation where I need it to be published under the version of Flash Player 8  =/
    Annoying, but help appreciated!
    Thanks,
    Jane

    with fp versions greater than 6 you need to initialize your variables before incrementing them.  eg, use:
    _root.score=0;
    when your app starts.

Maybe you are looking for

  • ClassCastException oracle.xml.parser.v2.XMLElement with correlation receive

    Hi, I am trying to run an asynchronous process that makes an invocation to an external WLI process, then gets an asynchronous receive from a second WLI process using correlation callbacks. We have two 10.1.3.3.0 servers, and the process works perfect

  • Need some help disabling/enabling the scrollbar on our website

    Dear Sir/madam, I am having some difficulty with our website to disable or hide the scrollbar on our website. The thing is that i want to disable/hide the scrollbar when i got a small web page with only one alinea of text. And i want to enable the sc

  • Can the Hot Sync Log be cleared?

    Zire 31, Desktop 6.4, Vista Business-32 bit, and Outlook 2007. Can the log be cleared? I keep getting the same error message about some calendar entries, but the entries are correct in the handheld and in Outlook on the PC. Post relates to: Zire 31

  • QUICKTIME REFUSES TO PLAY ANY FORMAT OF VIDEO

    My QuickTime suddenly stopped playing all forms of videos that they allow. My Mac and QuickTime are up to date. I've tried using different converters ( VLC and online sources ) to see if the different formats help- they didn't. QuickTime will play pr

  • Compiling files belonging to a package..URGENT!!

    Dear all, c:> |___X.java | |___aces___Y.java --------------------X.java------------------------------ import aces.*; public class X { public X() { public static void main(String[] args) { new X(); new Y(); System.out.print("nHello"); ----------------