Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix function comments based on best practices from Effective Go #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v3/elementequinox/elementequinox.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var (
_J = unit.AngleFromDeg(.00651966)
)

// ReduceB1950ToJ2000 reduces orbital elements of a solar system body from
// ReduceB1950FK4ToJ2000FK5 reduces orbital elements of a solar system body from
// equinox B1950 in the FK4 system to equinox J2000 in the FK5 system.
func ReduceB1950FK4ToJ2000FK5(eFrom, eTo *Elements) *Elements {
W := _L + eFrom.Node
Expand Down
4 changes: 2 additions & 2 deletions v3/interp/interp.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (d *Len3) Extremum() (x, y float64, err error) {
return x, y, nil
}

// Len3Zero finds a zero of the quadratic function represented by the table.
// Zero finds a zero of the quadratic function represented by the table.
//
// That is, it returns an x value that yields y=0.
//
Expand Down Expand Up @@ -350,7 +350,7 @@ func (d *Len5) Extremum() (x, y float64, err error) {
return x, y, nil
}

// Len5Zero finds a zero of the quartic function represented by the table.
// Zero finds a zero of the quartic function represented by the table.
//
// That is, it returns an x value that yields y=0.
//
Expand Down
2 changes: 1 addition & 1 deletion v3/iterate/iterate.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func DecimalPlaces(better BetterFunc, start float64, places, maxIterations int)
return 0, errors.New("Maximum iterations reached")
}

// FullPrecison iterates to (nearly) the full precision of a float64.
// FullPrecision iterates to (nearly) the full precision of a float64.
//
// To allow for a little bit of floating point jitter, FullPrecision iterates
// to 15 significant figures, which is the maximum number of full significant
Expand Down
2 changes: 1 addition & 1 deletion v3/precess/precess.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func NewEclipticPrecessor(epochFrom, epochTo float64) *EclipticPrecessor {
return p
}

// EclipticPrecess precesses coordinates eclFrom, leaving result in eclTo.
// Precess precesses coordinates eclFrom, leaving result in eclTo.
//
// The same struct may be used for eclFrom and eclTo.
// EclTo is returned for convenience.
Expand Down