[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-patch-tracker] [patch #9953] [octave forge] (mapping) angl2str

From: Ricardo Fantin da Costa
Subject: [Octave-patch-tracker] [patch #9953] [octave forge] (mapping) angl2str
Date: Wed, 2 Sep 2020 14:32:30 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Follow-up Comment #14, patch #9953 (project octave):

Update mostly style things:
Long lines divided in two or three. It apply to comments, string
concatenations and calculations. Some lines passed a little the 80 char
Lines with only comments uses two # instead of one #.
Use of ismember() instead of some strcmp().
Verification of arguments types made before others verifications.
Function round() was included as an inner function renamed to round_a().
I tested the use of roundn(), but probably there is one bug in that function.

I do not know English well to find grammar errors. I need your help in this

The -181.6999999999 that did not became a 181° 42' 00.0000" W because of a ||
that should be a | .
Code before:
m(s >= 60 || (s == 0 && intermediary_calc >= 30)) += 1;
Code now:
m(s >= 60 | (s == 0 & intermediary_calc >= 30)) += 1;
The error only occur when at least two numbers are inputted, and most tests
had only one input each time. Your sample became a test (the 491º test

I found a bug in roundn(). If was not for the bug, then roundn would be
exactly what I need. roundn(20,-2) should became 20.00, but it turns into 0.

roundn() is the same thing that last version round(), but without the option
to round using "significant". In roundn() where is wrote:
if (mod (x, 1) != 0)
should verify if n is positive or negative. mod (x,1) verifies if x has a
fractional part, I did not understand this verification intention and I may be
interpreting wrong.

Could you take a look in the code again? (grammar, inner function round_a
instead of round or roundn, some style fault)

(file #49734)

Additional Item Attachment:

File name: angl2str.m                     Size:38 KB


Reply to this item at:


  Mensagem enviada pelo Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]