mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 01:48:04 -04:00
deprecate some kutil 1.23 functions
This commit is contained in:
parent
334939b8b5
commit
a5cead6768
@ -331,10 +331,12 @@ object KUtil {
|
||||
return x.matches(other.x, margin) && y.matches(other.y, margin) && z.matches(other.z, margin)
|
||||
}
|
||||
|
||||
@Deprecated("glm, to remove")
|
||||
fun toRad(value: Float): Float {
|
||||
return value * 0.017453292f
|
||||
}
|
||||
|
||||
@Deprecated("Kutil 1.23")
|
||||
fun String.fill(char: Char, length: Int): String {
|
||||
if (this.length >= length) return this
|
||||
val fill = char.toString().repeat(length - this.length)
|
||||
@ -342,17 +344,6 @@ object KUtil {
|
||||
return fill + this
|
||||
}
|
||||
|
||||
|
||||
fun <T> Array<T>.next(current: T): T {
|
||||
val index = this.indexOf(current)
|
||||
check(index >= 0) { "Array does not contain $current" }
|
||||
|
||||
if (index == this.size - 1) {
|
||||
return this[0]
|
||||
}
|
||||
return this[index + 1]
|
||||
}
|
||||
|
||||
fun <T> table(elements: Collection<T>, vararg headers: AnyString, builder: (T) -> Array<Any?>?): Table {
|
||||
val table = Table(headers.unsafeCast())
|
||||
|
||||
@ -363,6 +354,7 @@ object KUtil {
|
||||
return table
|
||||
}
|
||||
|
||||
@Deprecated("Kutil 1.23")
|
||||
fun AbstractLatch?.child(count: Int): AbstractLatch {
|
||||
if (this == null) return SimpleLatch(count)
|
||||
return ParentLatch(count, this)
|
||||
|
Loading…
x
Reference in New Issue
Block a user