[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc
From: |
Philip Nienhuis |
Subject: |
[Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc |
Date: |
Tue, 28 Jul 2020 12:05:42 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #5, patch #9958 (project octave):
Yeah the answer is right, I don't understand the "ambiguity" the comment
refers to.
As to style:
* consistently parentheses around if conditions (e.g., L.91 and L.119 - in the
latter you can just move the rightmost parenthesis behind the "0")
* consistently spaces around assignment "=" and operators and 1 space between
function name and opening parenthesis. So e.g., L.87:
del_12=2*asin(sqrt(sin(del_lat/2)^2+cos(vect(1))*cos(vect(4))*sin(del_lon/2)^2));
==>
del_12 = 2 * asin (sqrt (sin (del_lat / 2) ^ 2 + cos (vect(1)) * cos (vect(4))
* sin (del_lon / 2) ^ 2));
(You can add continuation markers ... and break statements over multiple
lines)
* double quotes " rather than ' around strings (L. 114).
Agreed, all nitpicking but this is the coding style adopted by Octave devs.
In the mean time I've already done this and also adapted the function to
accept vector inputs. The intermediate result (gcxgc2.m) is attached.
(file #49560)
_______________________________________________________
Additional Item Attachment:
File name: gcxgc2.m Size:5 KB
<https://file.savannah.gnu.org/file/gcxgc2.m?file_id=49560>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?9958>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, anonymous, 2020/07/20
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, Philip Nienhuis, 2020/07/26
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, Philip Nienhuis, 2020/07/27
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, Philip Nienhuis, 2020/07/27
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, anonymous, 2020/07/27
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc,
Philip Nienhuis <=
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, anonymous, 2020/07/30
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, Philip Nienhuis, 2020/07/30
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, Philip Nienhuis, 2020/07/30
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, Philip Nienhuis, 2020/07/30
- [Octave-patch-tracker] [patch #9958] [octave forge](mapping) gcxgc, Philip Nienhuis, 2020/07/30