Skip to content

Commit

Permalink
Remove duplicate extension function
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincianfarini committed Dec 31, 2024
1 parent ddaf437 commit c0232c5
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@ package io.github.kevincianfarini.alchemist.scalar
import io.github.kevincianfarini.alchemist.internal.SaturatingLong
import io.github.kevincianfarini.alchemist.internal.saturated
import io.github.kevincianfarini.alchemist.type.Acceleration
import io.github.kevincianfarini.alchemist.type.Velocity
import kotlin.time.Duration

/**
* Returns the resulting [Velocity] after multiplying the specified [acceleration] by this duration.
*
* This operation attempts to retain precision, but for sufficiently large values of this duration or the
* specified [acceleration] some precision may be lost.
*
* @throws IllegalArgumentException if this duration is infinite and [acceleration] is zero, or if this duration
* is zero and [acceleration] is infinite.
*/
public fun Duration.times(acceleration: Acceleration): Velocity = acceleration * this

internal val Int.nmPerSecond2: Acceleration get() = toLong().nmPerSecond2
internal val Long.nmPerSecond2: Acceleration get() = Acceleration(saturated)
Expand Down

0 comments on commit c0232c5

Please sign in to comment.