@@ -26,22 +26,35 @@ val CharBuffer.size
26
26
operator fun ByteBuffer.set (index : Int , byte : Byte ): ByteBuffer = put(index, byte)
27
27
operator fun ByteBuffer.set (index : Int , int : Int ): ByteBuffer = put(index, int.b)
28
28
operator fun ByteBuffer.set (index : Int , short : Short ): ByteBuffer = put(index, short.b)
29
+ operator fun ByteBuffer.set (index : Int , long : Long ): ByteBuffer = put(index, long.b)
30
+ operator fun ByteBuffer.set (index : Int , float : Float ): ByteBuffer = put(index, float.b)
31
+ operator fun ByteBuffer.set (index : Int , long : Double ): ByteBuffer = put(index, long.b)
29
32
33
+ operator fun ShortBuffer.set (index : Int , byte : Byte ): ShortBuffer = put(index, byte.s)
30
34
operator fun ShortBuffer.set (index : Int , short : Short ): ShortBuffer = put(index, short)
31
35
operator fun ShortBuffer.set (index : Int , int : Int ): ShortBuffer = put(index, int.s)
36
+ operator fun ShortBuffer.set (index : Int , long : Long ): ShortBuffer = put(index, long.s)
32
37
38
+ operator fun IntBuffer.set (index : Int , byte : Byte ): IntBuffer = put(index, byte.i)
39
+ operator fun IntBuffer.set (index : Int , short : Short ): IntBuffer = put(index, short.i)
33
40
operator fun IntBuffer.set (index : Int , int : Int ): IntBuffer = put(index, int)
41
+ operator fun IntBuffer.set (index : Int , long : Long ): IntBuffer = put(index, long.i)
34
42
35
- operator fun LongBuffer.set (index : Int , long : Long ): LongBuffer = put(index, long)
43
+ operator fun LongBuffer.set (index : Int , byte : Byte ): LongBuffer = put(index, byte.L )
44
+ operator fun LongBuffer.set (index : Int , short : Short ): LongBuffer = put(index, short.L )
36
45
operator fun LongBuffer.set (index : Int , int : Int ): LongBuffer = put(index, int.L )
46
+ operator fun LongBuffer.set (index : Int , long : Long ): LongBuffer = put(index, long)
37
47
38
48
operator fun FloatBuffer.set (index : Int , float : Float ): FloatBuffer = put(index, float)
49
+ operator fun FloatBuffer.set (index : Int , double : Double ): FloatBuffer = put(index, double.f)
50
+ operator fun DoubleBuffer.set (index : Int , float : Float ): DoubleBuffer = put(index, float.d)
39
51
operator fun DoubleBuffer.set (index : Int , double : Double ): DoubleBuffer = put(index, double)
40
52
41
53
operator fun CharBuffer.set (index : Int , char : Char ): CharBuffer = put(index, char)
42
54
operator fun CharBuffer.set (index : Int , int : Int ): CharBuffer = put(index, int.c)
43
55
44
- operator fun ByteBuffer.set (index : Int , vec4 : Vec4t <* >) = vec4.to(this , vec4.size() * index)
56
+ // TODO conform to the other?
57
+ // operator fun ByteBuffer.set(index: Int, vec4: Vec4t<*>) = vec4.to(this, vec4.size() * index)
45
58
46
59
47
60
operator fun ByteBuffer.invoke (index : Int , byte : Byte ): ByteBuffer = put(index, byte)
@@ -65,4 +78,4 @@ operator fun ByteBuffer.invoke(index: Int, double: Double): ByteBuffer = putDoub
65
78
// operator fun CharBuffer.invoke(index: Int, char: Char): CharBuffer = put(index, char)
66
79
// operator fun CharBuffer.invoke(index: Int, int: Int): CharBuffer = put(index, int.c)
67
80
//
68
- // operator fun ByteBuffer.invoke(index: Int, vec4: Vec4t<*>) = vec4.to(this, vec4.instanceSize () * index)
81
+ // operator fun ByteBuffer.invoke(index: Int, vec4: Vec4t<*>) = vec4.to(this, vec4.size () * index)
0 commit comments