VS
Size: a a a
VS
(
QH
(
QH
Set<Integer>
(
QH
QH
(
(
QH
QH
(
inline class Vect2(private val backer: ULong) {
val x: Float
get() = Float.fromBits(backer.shr(32).toInt())
val y: Float
get() = Float.fromBits(backer.toInt())
inline operator fun plus(other: Vect2): Vect2 {
return Vect2(x + other.x, y + other.y)
}
inline operator fun minus(other: Vect2): Vect2 {
return Vect2(x - other.x, y - other.y)
}
inline fun len2(): Float {
return x * x + y * y
}
inline fun len(): Float {
return sqrt(len2())
}
companion object {
inline operator fun invoke(x: Float, y: Float): Vect2 {
return Vect2(x.toRawBits().toULong().shl(32).or(y.toRawBits().toULong()))
}
}
}
(
(
inline class Vect2(private val backer: ULong) {
val x: Float
get() = Float.fromBits(backer.shr(32).toInt())
val y: Float
get() = Float.fromBits(backer.toInt())
inline operator fun plus(other: Vect2): Vect2 {
return Vect2(x + other.x, y + other.y)
}
inline operator fun minus(other: Vect2): Vect2 {
return Vect2(x - other.x, y - other.y)
}
inline fun len2(): Float {
return x * x + y * y
}
inline fun len(): Float {
return sqrt(len2())
}
companion object {
inline operator fun invoke(x: Float, y: Float): Vect2 {
return Vect2(x.toRawBits().toULong().shl(32).or(y.toRawBits().toULong()))
}
}
}
DP
DP
KK