Navigation

    KorGE

    • Register
    • Login
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. nanodeath
    3. Posts
    N
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by nanodeath

    • Why is Korma's Easing interface not an enum?

      Question for @soywiz: why are all the easings in Easing.kt in a hidden object and not in an enum?

      Seems like

      interface Easing {
          operator fun invoke(it: Double): Double
      }
      enum class Easings : Easing {
          LINEAR {
              override fun invoke(it: Double) = it
          }
          // etc
      }
      

      should work great, no?

      While working on https://github.com/korlibs/korma/pull/42 I thought it'd be nice to have a test case that iterated over all the easings to perform some basic assertions on them, but the current structure makes this difficult.

      posted in General
      N
      nanodeath