/**
* Copyright (C) 2018 Adrien Hopkins
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see
* This must be the inverse of {@code convertToBase}, so {@code convertFromBase(convertToBase(value))} must be equal * to {@code value} for any value, ignoring precision loss by roundoff error. *
** If this unit is a base unit, this method should return {@code value}. *
* * @param value * value expressed in base unit * @return value expressed in this unit * @since 2018-12-22 */ double convertFromBase(double value); /** * Converts from a value expressed in this unit to a value expressed in this unit's base unit. ** This must be the inverse of {@code convertFromBase}, so {@code convertToBase(convertFromBase(value))} must be * equal to {@code value} for any value, ignoring precision loss by roundoff error. *
** If this unit is a base unit, this method should return {@code value}. *
* * @param value * value expressed in this unit * @return value expressed in base unit * @since 2018-12-22 */ double convertToBase(double value); /** ** Returns the base unit associated with this unit. *
** The dimension of this unit must be equal to the dimension of the returned unit. *
** If this unit is a base unit, this method should return this unit.\ *
* * @return base unit associated with this unit * @since 2018-12-22 */ Unit getBase(); /** * @return dimension measured by this unit * @since 2018-12-22 */ UnitDimension getDimension(); /** * @return system that this unit is a part of * @since 2018-12-23 */ UnitSystem getSystem(); }