combine

open fun <D : Unit<D>?> combine(numerator: Unit<D>, period: Time, name: String, symbol: String): Velocity<D>

Creates a new velocity unit derived from an arbitrary numerator and time period units.

Results of this method are cached so future invocations with the same arguments will return the pre-existing units instead of generating new identical ones.

  Velocity.combine(Kilograms, Second) // mass flow
  Velocity.combine(Feet, Millisecond) // linear speed
  Velocity.combine(Radians, Second) // angular speed

  Velocity.combine(Feet.per(Second), Second) // linear acceleration in ft/s/s
  Velocity.combine(Radians.per(Second), Second) // angular acceleration

It's recommended to use the convenience function per instead of calling this factory directly.

Return

the new unit

Parameters

<D>

the type of the numerator unit

numerator

the numerator unit

period

the period for unit time

name

the name of the new velocity unit

symbol

the symbol of the new velocity unit


open fun <D : Unit<D>?> combine(numerator: Unit<D>, period: Time): Velocity<D>

Creates a new velocity unit derived from an arbitrary numerator and time period units.

Results of this method are cached so future invocations with the same arguments will return the pre-existing units instead of generating new identical ones.

This method automatically generates a new name and symbol for the new velocity unit.

  Velocity.combine(Kilograms, Second) // mass flow
  Velocity.combine(Feet, Millisecond) // linear speed
  Velocity.combine(Radians, Second) // angular speed

  Velocity.combine(Feet.per(Second), Second) // linear acceleration in ft/s/s
  Velocity.combine(Radians.per(Second), Second) // angular acceleration

It's recommended to use the convenience function per instead of calling this factory directly.

Return

the new unit

Parameters

<D>

the type of the numerator unit

numerator

the numerator unit

period

the period for unit time