
org.tenkiv.physikal.complete.Cgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of complete-units Show documentation
Show all versions of complete-units Show documentation
Exension library to aid in unit conversion and handling.
The newest version!
/*
* Copyright 2018 Tenkiv, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package org.tenkiv.physikal.complete
import org.tenkiv.physikal.core.MetricPrefixedNumber
import org.tenkiv.physikal.core.invoke
import si.uom.quantity.DynamicViscosity
import si.uom.quantity.KinematicViscosity
import systems.uom.common.CGS.*
import tec.units.indriya.ComparableQuantity
import tec.units.indriya.quantity.Quantities
import javax.measure.quantity.*
/**
* Builder method for [ComparableQuantity] with unit [CENTIMETRE].
*
* @return A [ComparableQuantity] with specified value.
*/
val Number.centimetre: ComparableQuantity
get() = Quantities.getQuantity(this, CENTIMETRE)
/**
* Builder method for [ComparableQuantity] with unit [CENTIMETRE].
*
* @return A [ComparableQuantity] with specified value.
*/
val MetricPrefixedNumber.centimetre: ComparableQuantity
get() = number(CENTIMETRE.transform(prefix.converter))
/**
* Builder method for [ComparableQuantity] with unit [CENTIMETRE_PER_SECOND].
*
* @return A [ComparableQuantity] with specified value.
*/
val Number.centimetrePerSecond: ComparableQuantity
get() = Quantities.getQuantity(this, CENTIMETRE_PER_SECOND)
/**
* Builder method for [ComparableQuantity] with unit [CENTIMETRE_PER_SECOND].
*
* @return A [ComparableQuantity] with specified value.
*/
val MetricPrefixedNumber.centimetrePerSecond: ComparableQuantity
get() = number(CENTIMETRE_PER_SECOND.transform(prefix.converter))
/**
* Builder method for [ComparableQuantity] with unit [KAYSER].
*
* @return A [ComparableQuantity] with specified value.
*/
val Number.kayserCgs: ComparableQuantity
get() = Quantities.getQuantity(this, KAYSER)
/**
* Builder method for [ComparableQuantity] with unit [KAYSER].
*
* @return A [ComparableQuantity] with specified value.
*/
val MetricPrefixedNumber.kayserCgs: ComparableQuantity
get() = number(KAYSER.transform(prefix.converter))
/**
* Builder method for [ComparableQuantity] with unit [GAL].
*
* @return A [ComparableQuantity] with specified value.
*/
val Number.gal: ComparableQuantity
get() = Quantities.getQuantity(this, GAL)
/**
* Builder method for [ComparableQuantity] with unit [GAL].
*
* @return A [ComparableQuantity] with specified value.
*/
val MetricPrefixedNumber.gal: ComparableQuantity
get() = number(GAL.transform(prefix.converter))
/**
* Builder method for [ComparableQuantity] with unit [DYNE].
*
* @return A [ComparableQuantity] with specified value.
*/
val Number.dyne: ComparableQuantity
get() = Quantities.getQuantity(this, DYNE)
/**
* Builder method for [ComparableQuantity] with unit [DYNE].
*
* @return A [ComparableQuantity] with specified value.
*/
val MetricPrefixedNumber.dyne: ComparableQuantity
get() = number(DYNE.transform(prefix.converter))
/**
* Builder method for [ComparableQuantity] with unit [ERG].
*
* @return A [ComparableQuantity] with specified value.
*/
val Number.erg: ComparableQuantity
get() = Quantities.getQuantity(this, ERG)
/**
* Builder method for [ComparableQuantity] with unit [ERG].
*
* @return A [ComparableQuantity] with specified value.
*/
val MetricPrefixedNumber.erg: ComparableQuantity
get() = number(ERG.transform(prefix.converter))
/**
* Builder method for [ComparableQuantity] with unit [POISE].
*
* @return A [ComparableQuantity] with specified value.
*/
val Number.poise: ComparableQuantity
get() = Quantities.getQuantity(this, POISE)
/**
* Builder method for [ComparableQuantity] with unit [POISE].
*
* @return A [ComparableQuantity] with specified value.
*/
val MetricPrefixedNumber.poise: ComparableQuantity
get() = number(POISE.transform(prefix.converter))
/**
* Builder method for [ComparableQuantity] with unit [ERG_PER_SECOND].
*
* @return A [ComparableQuantity] with specified value.
*/
val Number.ergPerSecond: ComparableQuantity
get() = Quantities.getQuantity(this, ERG_PER_SECOND)
/**
* Builder method for [ComparableQuantity] with unit [ERG_PER_SECOND].
*
* @return A [ComparableQuantity] with specified value.
*/
val MetricPrefixedNumber.ergPerSecond: ComparableQuantity
get() = number(ERG_PER_SECOND.transform(prefix.converter))
© 2015 - 2025 Weber Informatics LLC | Privacy Policy