elect
09/24/2018, 12:14 PMVec3
class where I retrieve components as
override var x: Float
get() = array[ofs]
set(value) = array.set(ofs, value)
Why from java getX()
returns Float
instead float
?Andreas Sinz
09/24/2018, 12:18 PMarray
? Array<Float>
?poohbar
09/24/2018, 12:20 PMFloatArray
elect
09/24/2018, 12:21 PMFloatArray
Vec3 : Vec3t<Float>
abstract class Vec3t<T : Number> {
abstract var x: T
Andreas Sinz
09/24/2018, 12:23 PMdiesieben07
09/24/2018, 1:02 PMelect
09/24/2018, 3:38 PMval a = Vec3()
val b = a.x
is involving boxing?L2
LINENUMBER 146 L2
ALOAD 1
INVOKEVIRTUAL glm_/vec3/Vec3.getX ()Ljava/lang/Float;
INVOKEVIRTUAL java/lang/Float.floatValue ()F
FSTORE 2
L3
diesieben07
09/24/2018, 4:40 PMelect
09/24/2018, 4:40 PMdiesieben07
09/24/2018, 4:41 PMjava.lang.Float
is being used, which is the boxed versionelect
09/24/2018, 4:46 PM.x
the bytecode viewer crashdiesieben07
09/24/2018, 5:05 PM