@@ -48,8 +48,8 @@ private TemperatureCache() {
4848 * Create a cache that allows calculation of ex. complementary and analogous colors.
4949 *
5050 * @param input Color to find complement/analogous colors of. Any colors will have the same tone,
51- * and chroma as the input color, modulo any restrictions due to the other hues having lower
52- * limits on chroma.
51+ * and chroma as the input color, modulo any restrictions due to the other hues having lower
52+ * limits on chroma.
5353 */
5454 public TemperatureCache (Hct input ) {
5555 this .input = input ;
@@ -83,14 +83,12 @@ public Hct getComplement() {
8383 // Find the color in the other section, closest to the inverse percentile
8484 // of the input color. This is the complement.
8585 for (double hueAddend = 0. ; hueAddend <= 360. ; hueAddend += 1. ) {
86- double hue = MathUtils .sanitizeDegreesDouble (
87- startHue + directionOfRotation * hueAddend );
86+ double hue = MathUtils .sanitizeDegreesDouble (startHue + directionOfRotation * hueAddend );
8887 if (!isBetween (hue , startHue , endHue )) {
8988 continue ;
9089 }
9190 Hct possibleAnswer = getHctsByHue ().get ((int ) Math .round (hue ));
92- double relativeTemp =
93- (getTempsByHct ().get (possibleAnswer ) - coldestTemp ) / range ;
91+ double relativeTemp = (getTempsByHct ().get (possibleAnswer ) - coldestTemp ) / range ;
9492 double error = Math .abs (complementRelativeTemp - relativeTemp );
9593 if (error < smallestError ) {
9694 smallestError = error ;
@@ -217,8 +215,7 @@ public List<Hct> getAnalogousColors(int count, int divisions) {
217215 */
218216 public double getRelativeTemperature (Hct hct ) {
219217 double range = getTempsByHct ().get (getWarmest ()) - getTempsByHct ().get (getColdest ());
220- double differenceFromColdest =
221- getTempsByHct ().get (hct ) - getTempsByHct ().get (getColdest ());
218+ double differenceFromColdest = getTempsByHct ().get (hct ) - getTempsByHct ().get (getColdest ());
222219 // Handle when there's no difference in temperature between warmest and
223220 // coldest: for example, at T100, only one color is available, white.
224221 if (range == 0. ) {
@@ -284,7 +281,7 @@ private List<Hct> getHctsByHue() {
284281 // A java_library Bazel rule with an Android constraint cannot skip these warnings without this
285282 // annotation; another solution would be to create an android_library rule and supply
286283 // AndroidManifest with an SDK set higher than 23.
287- @ SuppressWarnings ({ "AndroidJdkLibsChecker" , " NewApi"} )
284+ @ SuppressWarnings (" NewApi" )
288285 private List <Hct > getHctsByTemp () {
289286 if (precomputedHctsByTemp != null ) {
290287 return precomputedHctsByTemp ;
0 commit comments