Multiplication of matter values
This commit is contained in:
parent
0481507217
commit
9f6927cb8a
@ -28,6 +28,14 @@ interface IMatterValue : Comparable<IMatterValue> {
|
|||||||
return MatterValue(matter - other.matter, complexity - other.complexity)
|
return MatterValue(matter - other.matter, complexity - other.complexity)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
operator fun times(other: IMatterValue): IMatterValue {
|
||||||
|
return MatterValue(matter * other.matter, complexity * other.complexity)
|
||||||
|
}
|
||||||
|
|
||||||
|
operator fun times(other: Int): IMatterValue {
|
||||||
|
return MatterValue(matter * other, complexity * other)
|
||||||
|
}
|
||||||
|
|
||||||
override fun compareTo(other: IMatterValue): Int {
|
override fun compareTo(other: IMatterValue): Int {
|
||||||
val matterComparison = matter.compareTo(other.matter)
|
val matterComparison = matter.compareTo(other.matter)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user