Skip to content

Commit

Permalink
move some things
Browse files Browse the repository at this point in the history
  • Loading branch information
jordond committed Sep 15, 2023
1 parent 238c8c1 commit bfc687a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
matrix:
api-level: [ 24, 29, 31 ]
runs-on: macos-latest
name: Test API ${{ matrix.config.api-level }}
name: Test API ${{ matrix.api-level }}
needs: verify
steps:
- name: Checkout
Expand Down Expand Up @@ -142,6 +142,7 @@ jobs:
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
force-avd-creation: false
disable-animations: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
Expand All @@ -151,6 +152,7 @@ jobs:
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
disable-animations: true
force-avd-creation: false
ram-size: 4096M
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import dev.drewhamilton.poko.Poko
import dev.jordond.kmpalette.palette.graphics.Palette.Builder
import dev.jordond.kmpalette.palette.internal.ColorCutQuantizer
import dev.jordond.kmpalette.palette.internal.scale
import dev.jordond.kmpalette.palette.utils.ColorUtils
import dev.jordond.kmpalette.palette.internal.utils.ColorUtils
import kotlin.math.abs
import kotlin.math.ceil
import kotlin.math.floor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package dev.jordond.kmpalette.palette.internal

import dev.jordond.kmpalette.palette.graphics.Palette
import dev.jordond.kmpalette.palette.utils.ColorUtils
import dev.jordond.kmpalette.palette.utils.PriorityQueue
import dev.jordond.kmpalette.palette.internal.utils.ColorUtils
import dev.jordond.kmpalette.palette.internal.utils.PriorityQueue
import kotlin.math.min
import kotlin.math.round

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.jordond.kmpalette.palette.utils
package dev.jordond.kmpalette.palette.internal.utils

import androidx.annotation.ColorInt
import androidx.annotation.FloatRange
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.jordond.kmpalette.palette.utils
package dev.jordond.kmpalette.palette.internal.utils

internal class PriorityQueue<T>(
private val comparator: Comparator<in T>,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.jordond.kmpalette.palette.utils
package dev.jordond.kmpalette.palette.internal.utils

import kotlin.math.pow

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.jordond.kmpalette.palette.utils
package dev.jordond.kmpalette.palette.internal.utils

import kotlin.math.pow
import kotlin.math.roundToInt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package dev.jordond.kmpalette.palette.utils
package dev.jordond.kmpalette.palette.internal.utils

import kotlin.test.Test
import kotlin.test.assertTrue

class PowKtTest {

@Test
fun `should return 1 when exponent is 0`() {
fun `should calculate the exponent value`() {
assertTrue(pow(2.0, 1.0) == 2.0)
assertTrue(pow(2.0, 2.0) == 4.0)
assertTrue(pow(2.0, 3.0) == 8.0)
Expand Down

0 comments on commit bfc687a

Please sign in to comment.