Skip to content

Commit ab10f66

Browse files
committed
number casting: only keep Number::...
It's inlined, not need for that many functions.
1 parent 0c90ac2 commit ab10f66

File tree

2 files changed

+4
-90
lines changed

2 files changed

+4
-90
lines changed

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
org.gradle.jvmargs=-Dkotlin.daemon.jvm.options="-Xmx1g" -XX:MaxMetaspaceSize=1g
22
org.gradle.daemon=false
3-
#systemProp.alignVerbose=true
3+
#systemProp.alignVerbose=true
4+
5+
mavenCentralPortalUsername=
6+
mavenCentralPortalPassword=

src/main/kotlin/glm_/extensions.kt

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -10,95 +10,6 @@ import kotlin.math.pow
1010
* Created by GBarbieri on 07.12.2016.
1111
*/
1212

13-
inline val Byte.f get() = toFloat()
14-
inline val Byte.b get() = toByte()
15-
inline val Byte.d get() = toDouble()
16-
inline val Byte.i get() = toInt()
17-
inline val Byte.L get() = toLong()
18-
inline val Byte.s get() = toShort()
19-
inline val Byte.ub get() = toUbyte()
20-
inline val Byte.ui get() = toUint()
21-
inline val Byte.ul get() = toUlong()
22-
inline val Byte.us get() = toUshort()
23-
inline val Byte.c get() = toInt().toChar()
24-
inline val Byte.bool get() = i != 0
25-
26-
inline val Short.f get() = toFloat()
27-
inline val Short.b get() = toByte()
28-
inline val Short.d get() = toDouble()
29-
inline val Short.i get() = toInt()
30-
inline val Short.L get() = toLong()
31-
inline val Short.s get() = toShort()
32-
inline val Short.ub get() = toUbyte()
33-
inline val Short.ui get() = toUint()
34-
inline val Short.ul get() = toUlong()
35-
inline val Short.us get() = toUshort()
36-
inline val Short.c get() = toInt().toChar()
37-
inline val Short.bool get() = i != 0
38-
39-
inline val Char.f get() = code.toFloat()
40-
inline val Char.b get() = code.toByte()
41-
inline val Char.d get() = code.toDouble()
42-
inline val Char.i get() = code
43-
inline val Char.L get() = code.toLong()
44-
inline val Char.s get() = code.toShort()
45-
inline val Char.ub get() = toUbyte()
46-
inline val Char.ui get() = toUint()
47-
inline val Char.ul get() = toUlong()
48-
inline val Char.us get() = toUshort()
49-
50-
inline val Int.f get() = toFloat()
51-
inline val Int.b get() = toByte()
52-
inline val Int.d get() = toDouble()
53-
inline val Int.i get() = toInt()
54-
inline val Int.L get() = toLong()
55-
inline val Int.s get() = toShort()
56-
inline val Int.ub get() = toUbyte()
57-
inline val Int.ui get() = toUint()
58-
inline val Int.ul get() = toUlong()
59-
inline val Int.us get() = toUshort()
60-
inline val Int.c get() = toChar()
61-
inline val Int.bool get() = i != 0
62-
63-
inline val Long.f get() = toFloat()
64-
inline val Long.b get() = toByte()
65-
inline val Long.d get() = toDouble()
66-
inline val Long.i get() = toInt()
67-
inline val Long.L get() = toLong()
68-
inline val Long.s get() = toShort()
69-
inline val Long.ub get() = toUbyte()
70-
inline val Long.ui get() = toUint()
71-
inline val Long.ul get() = toUlong()
72-
inline val Long.us get() = toUshort()
73-
inline val Long.c get() = toInt().toChar()
74-
inline val Long.bool get() = i != 0
75-
76-
inline val Float.f get() = toFloat()
77-
inline val Float.b get() = toInt().toByte()
78-
inline val Float.d get() = toDouble()
79-
inline val Float.i get() = toInt()
80-
inline val Float.L get() = toLong()
81-
inline val Float.s get() = toInt().toShort()
82-
inline val Float.ub get() = toUbyte()
83-
inline val Float.ui get() = toUint()
84-
inline val Float.ul get() = toUlong()
85-
inline val Float.us get() = toUshort()
86-
inline val Float.c get() = toInt().toChar()
87-
inline val Float.bool get() = i != 0
88-
89-
inline val Double.f get() = toFloat()
90-
inline val Double.b get() = toInt().toByte()
91-
inline val Double.d get() = toDouble()
92-
inline val Double.i get() = toInt()
93-
inline val Double.L get() = toLong()
94-
inline val Double.s get() = toInt().toShort()
95-
inline val Double.ub get() = toUbyte()
96-
inline val Double.ui get() = toUint()
97-
inline val Double.ul get() = toUlong()
98-
inline val Double.us get() = toUshort()
99-
inline val Double.c get() = toInt().toChar()
100-
inline val Double.bool get() = i != 0
101-
10213
inline val Number.f get() = toFloat()
10314
inline val Number.b get() = toByte()
10415
inline val Number.d get() = toDouble()

0 commit comments

Comments
 (0)