Multiplication of matter values

This commit is contained in:
DBotThePony 2023-03-20 18:06:08 +07:00
parent 0481507217
commit 9f6927cb8a
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -28,6 +28,14 @@ interface IMatterValue : Comparable<IMatterValue> {
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 {
val matterComparison = matter.compareTo(other.matter)