Results 1 to 7 of 7

Thread: Cose(90)

  1. #1
    Join Date
    Feb 2009
    Location
    UK
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Cose(90)

    This code:
    SCAR Code:
    Writeln(FloatToStr(Cose(Round(Degrees(Pi / 2)))));
    Outputs the line: -2.71050543121376E-20.
    The actually value of Cos(90) = 0.

    The rest of the values seem to work somehow though
    SCAR Code:
    if (YourActivity = 'ReadingThis') then
        Inc(ViewCount);

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Writeln(FloatToStr(Cose(Round(Degrees(Pi / 2)))));
    Are you sure that
    Round(Degrees(Pi / 2)))
    returns 90?
    ~Hermen

  3. #3
    Join Date
    Feb 2009
    Location
    UK
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes,
    SCAR Code:
    Writeln(IntToStr(Round(Degrees(Pi / 2))));
    That writes 90 into the debug box.
    SCAR Code:
    if (YourActivity = 'ReadingThis') then
        Inc(ViewCount);

  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Isn't the actual function Cos?

    function Cos(e : Extended): Extended;
    The Cos function is a mathematical function giving the Cosine value of X given in radians.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  5. #5
    Join Date
    Feb 2009
    Location
    UK
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Cos is used when you have the angle in raidans, Cose when you have it in degrees.

    SCAR Code:
    Writeln(FloatToStr(Cos(Pi / 2)));

    Returns same value, it's really strange =S
    SCAR Code:
    if (YourActivity = 'ReadingThis') then
        Inc(ViewCount);

  6. #6
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Scar bug... Talk to Freddy
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  7. #7
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Code:
    Line 3: [Error] (3:20): Unknown identifier 'Cose' in script
    Using scar 3.15b

    but writeln(FloatToStr(Cos(Pi / 2))); returns
    -2,71050543121376E-20 too, which is really weird

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
  •