public interface AestheticDifference
Modifier and Type | Field and Description |
---|---|
static AestheticDifference |
rgba8888 |
Modifier and Type | Method and Description |
---|---|
double |
difference(int a,
int b)
Finds the difference between two int values, which implementations of this interface may treat as colors, as
kinds of map feature, as item placement factors, or various other ways.
|
static final AestheticDifference rgba8888
double difference(int a, int b)
SquidColorCenter scc = new SquidColorCenter(); Color c1 = scc.get(a), c2 = scc.get(b); return ((c1.r - c2.r) * (c1.r - c2.r) + (c1.g - c2.g) * (c1.g - c2.g) + (c1.b - c2.b) * (c1.b - c2.b)) / 65536.0;
a
- an int that may be interpreted in different ways by different implementationsb
- another int that may be interpreted in different ways by different implementationsCopyright © Eben Howard 2012–2022. All rights reserved.