Skip to content

Commit

Permalink
Fix formatting issues using gofmt (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
deining authored Aug 20, 2024
1 parent fae0ace commit d11da68
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
20 changes: 10 additions & 10 deletions colors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ func BenchmarkFastLinearToColor(bench *testing.B) {
bench_result = c.R + c.G + c.B
}

/// XYZ ///
///////////
// / XYZ ///
// /////////
func TestXyzCreation(t *testing.T) {
for i, tt := range vals {
c := Xyz(tt.xyz[0], tt.xyz[1], tt.xyz[2])
Expand All @@ -286,8 +286,8 @@ func TestXyzConversion(t *testing.T) {
}
}

/// xyY ///
///////////
// / xyY ///
// /////////
func TestXyyCreation(t *testing.T) {
for i, tt := range vals {
c := Xyy(tt.xyy[0], tt.xyy[1], tt.xyy[2])
Expand All @@ -306,8 +306,8 @@ func TestXyyConversion(t *testing.T) {
}
}

/// L*a*b* ///
//////////////
// / L*a*b* ///
// ////////////
func TestLabCreation(t *testing.T) {
for i, tt := range vals {
c := Lab(tt.lab[0], tt.lab[1], tt.lab[2])
Expand Down Expand Up @@ -344,8 +344,8 @@ func TestLabWhiteRefConversion(t *testing.T) {
}
}

/// L*u*v* ///
//////////////
// / L*u*v* ///
// ////////////
func TestLuvCreation(t *testing.T) {
for i, tt := range vals {
c := Luv(tt.luv[0], tt.luv[1], tt.luv[2])
Expand Down Expand Up @@ -382,8 +382,8 @@ func TestLuvWhiteRefConversion(t *testing.T) {
}
}

/// HCL ///
///////////
// / HCL ///
// /////////
// CIE-L*a*b* in polar coordinates.
func TestHclCreation(t *testing.T) {
for i, tt := range vals {
Expand Down
3 changes: 2 additions & 1 deletion hsluv.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import "math"
// comparing to the test values, this modified white reference is used internally.
//
// See this GitHub thread for details on these values:
// https://github.com/hsluv/hsluv/issues/79
//
// https://github.com/hsluv/hsluv/issues/79
var hSLuvD65 = [3]float64{0.95045592705167, 1.0, 1.089057750759878}

func LuvLChToHSLuv(l, c, h float64) (float64, float64, float64) {
Expand Down
12 changes: 6 additions & 6 deletions sort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ func TestSortSimple(t *testing.T) {

// Ensure the output matches what we expected.
exp := []Color{
Color{R: 0.25, G: 0.0, B: 0},
Color{R: 0.50, G: 0.0, B: 0},
Color{R: 0.75, G: 0.0, B: 0},
Color{R: 0.0, G: 0.0, B: 0.25},
Color{R: 0.0, G: 0.0, B: 0.50},
Color{R: 0.0, G: 0.0, B: 0.75},
{R: 0.25, G: 0.0, B: 0},
{R: 0.50, G: 0.0, B: 0},
{R: 0.75, G: 0.0, B: 0},
{R: 0.0, G: 0.0, B: 0.25},
{R: 0.0, G: 0.0, B: 0.50},
{R: 0.0, G: 0.0, B: 0.75},
}
for i, e := range exp {
if out[i] != e {
Expand Down

0 comments on commit d11da68

Please sign in to comment.