another attempt

This commit is contained in:
minjaesong
2020-02-23 03:35:50 +09:00
parent a96df1041b
commit 0176c95539
2 changed files with 9 additions and 6 deletions

View File

@@ -29,6 +29,8 @@ internal class UnsafeCvecArray(val width: Int, val height: Int) {
fun setB(x: Int, y: Int, value: Float) { array.setFloat(toAddr(x, y) + 8, value) }
fun setA(x: Int, y: Int, value: Float) { array.setFloat(toAddr(x, y) + 12, value) }
fun addA(x: Int, y: Int, value: Float) { array.setFloat(toAddr(x, y) + 12, getA(x, y) + value) }
/**
* @param channel 0 for R, 1 for G, 2 for B, 3 for A
*/