All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.app.bsky.embed.AspectRatio.kt Maven / Gradle / Ivy

The newest version!
@file:Suppress("DEPRECATION")

package app.bsky.embed

import kotlin.Long
import kotlin.Suppress
import kotlinx.serialization.Serializable

/**
 * width:height represents an aspect ratio. It may be approximate, and may not correspond to
 * absolute dimensions in any given unit.
 */
@Serializable
public data class AspectRatio(
  public val width: Long,
  public val height: Long,
) {
  init {
    require(width >= 1) {
      "width must be >= 1, but was $width"
    }
    require(height >= 1) {
      "height must be >= 1, but was $height"
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy