unit: fix punctuation

This commit is contained in:
Dan Kortschak
2019-11-19 20:38:32 +10:30
parent 0625bf7eba
commit 0d9ff7fffe
31 changed files with 93 additions and 93 deletions

View File

@@ -18,20 +18,20 @@ type Angle float64
const Rad Angle = 1
// Unit converts the Angle to a *Unit
// Unit converts the Angle to a *Unit.
func (a Angle) Unit() *Unit {
return New(float64(a), Dimensions{
AngleDim: 1,
})
}
// Angle allows Angle to implement a Angleer interface
// Angle allows Angle to implement a Angleer interface.
func (a Angle) Angle() Angle {
return a
}
// From converts the unit into the receiver. From returns an
// error if there is a mismatch in dimension
// error if there is a mismatch in dimension.
func (a *Angle) From(u Uniter) error {
if !DimensionsMatch(u, Rad) {
*a = Angle(math.NaN())