Results 1 to 5 of 5

Thread: Section: Math Question

  1. #1
    Join Date
    Jul 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Section: Math Question

    {edit: this might be in the wrong place actually... sorry}

    http://docs.villavu.com/simba/scriptref/math.html#mine

    this page no longer exists-404 error.
    I know minE() is a math function, I would like to know what it does.

    minE(a,b: extended): extended;

    minE(wind,dist); //Found in Mouse.simba WindMouse() procedure
    Last edited by Too Soon; 01-17-2014 at 12:46 AM.

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Quote Originally Posted by Too Soon View Post
    {edit: this might be in the wrong place actually... sorry}

    http://docs.villavu.com/simba/scriptref/math.html#mine

    this page no longer exists-404 error.
    I know minE() is a math function, I would like to know what it does.

    minE(a,b: extended): extended;

    minE(wind,dist); //Found in Mouse.simba WindMouse() procedure
    Determines the minimum between two floating point/decimal values and returns the smallest of the two.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Jul 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    What about Max(a,b: integer): integer;
    Radius := Max((x2-x1)div 2, (y2-y1)div 2);
    Last edited by Olly; 01-17-2014 at 01:49 AM.

  4. #4
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Returns the biggest number, between a and b.. same with min returns the smallest.

  5. #5
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Simba Code:
    Radius := Max((x2-x1)div 2, (y2-y1)div 2);

    can be written as:

    Simba Code:
    Width := x2 - x1;
    Height := y2 - y1;
    Diameter := Max(width, height);
    Radius := diameter div 2;

    or even biggger as:

    Simba Code:
    Width := x2 - x1;
    Height := y2 - y1;
    if(Width > Height) then
      Diameter := Width
    else
      Diameter := Heigth;
    Radius := diameter div 2;

    It will get the radius of an oval. Picking the largest radius.

    Good questions, keep 'm coming!
    Working on: Tithe Farmer

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •