Changelog History
Page 2
-
v0.6.2 Changes
May 11, 2016May 10, 2016
- β Addition of
Information
andDataRate
dimensions - Integration with Scala.js
- π Improvements to Vectors including
- add
map
methods - add
angle
andpolar
methods for extracting the polar coordinates - rename to
SVector
with a factory methods for Double and Quantity based Vectors - better typing and dimensional conversions
- add
- β Addition of
Quantity.map
useful for mapping over underlying value without changing the type or units - β Addition of
Time
unitNanoseconds
- π Improve conversions to and from
Time
andscala.concurrent.Duration
to preserve units - β Addition of
Velocity
unitKilometersPerSecond
- π Fixed an issue with the
KilometersPerHour
unit - β Added ability to initialize Quantities from strings in exponential format
- β Addition of
Area.squareRoot
andVolume.cubeRoot
, each returning a Length - β Addition of
Length
unitAngstroms
- β Addition of
Energy
unitErgs
- β Addition of
Power
unitErgsPerSecond
- β‘οΈ Update of INR currency symbol to
βΉ
- β
Working prototype of generic number support (in
squants.experimental
in the test code) - β Add GitHub source code links to scaladocs
- β Addition of
AreaDensity
unitsGramsPerSquareCentimeter
andKilogramsPerHectare
- β Removed bogus conversion
Irradiance
/Power
->Area
- β Addition of
SpectralIrradiance
dimension - β Addition of
Irradiance
unitErgsPerSecondPerSquareCentimeter
- β Addition of support for OSGi
Thanks to Derek Morr, Rmihael, Florian Nussberger, Ajay Chandran, Gia BαΊ£o, Josh Lemer, Dave DeCaprio and Carlos Quiroz for their contributions.
Migration Notes
With the integration of Scala.js, the library needed to be broken down into a few sub projects. This requires a slight change to how the console needs to be loaded. The correct command is now:
sbt squantsJVM/console
Vector has been renamed to SVector and now provides the factory methods for both Quantity and Double based vectors. User code that creates vectors should be modified to use this factory.
π The improvements to Vectors also removed the various experiments for dimensional conversion. These improvements are significant but still contain experimental API features which are subject to change.π The support for generic numbers will exist only in test code for the project until we move on to 0.7.x development. Prior to that change, a 0.6.x release will be cut that will based on the old (Double) model. The goal will be to fully implement this feature during 0.7.x development.
The new dimension
Information
was originally calledStorage
. - β Addition of
-
v0.5.3 Changes
June 11, 2015June 11, 2015
- β¨ Enhance Quantity model to preserve the unit used in creating the value
- π Rename
UnitMultiplier
trait toUnitConverter
, themultiplier
field toconversionFactor
, and set access level of all fields to protected (see Migration notes) - π Rename
QuantityCompanion
toDimension
- π Rename
Quantity.valueUnit
tounit
- π Rename
MassFlowRate
toMassFlow
- π Rename
VolumeFlowRate
toVolumeFlow
- β Add
dimension
value to Quantity - π Improvements to
TimeIntegral
andTimeDerivative
traits - β Addition of
TimeSquared
, an intermediate non-quantity value, andSecondTimeDerivative
,SecondTimeIntegral
traits, all in support of second order time derivatives conversions. - β Addition of
Acceleration.analyze()
method - a candidate for a generic SecondTimeDerivative feature. - Addition of
KineticEnergy
method which takesMass
andVelocity
and applies the conversion (Mass, Velocity) => 1/2(Mass * Velocity * Velocity) yielding anEnergy
value. - β Addition of
KineticEnergy
method which takesMass
andMomentum
and applies the conversion (Mass, Momentum) => Momentum / (2 * Mass), yielding anEnergy
value. - β Addition of
Mass
unitsKilopounds
andMegapounds
- β Addition of
PowerRamp
unitsWattsPerMinute
andKilowattsPerMinutes
- β Addition of
MassFlow
unitsPoundsPerSecond
,PoundsPerHour
,KilopoundsPerHour
andMegapoundsPerHour
- β Addition of
VolumeFlow
unitCubicFeetPerHour
- β Addition of
Dimensionless
unitPercent
- Normalize
Temperature
model - β¨ Enhance to
UnitOfMeasure
model to include primaryUnit and siUnit - β
Simplify Json Serializers in
experimental.test
- β Removed redundant
toString
methods from a few classes - β‘οΈ Update
Length
/Area
/Volume
operations to be unit-sensitive - π Rename
CubicMiles
toCubicUsMiles
- Modify constants to use Exp notation where appropriate
- β‘οΈ Update Scala versions to 2.11.6 and 2.10.5
- β Add support for converting
Quantity
values to aTuple2
and initializing aQuantity
from a Tuple. - β Addition of
PressureChange
dimension - Correction of
Bars
/Pascals
conversion factor
Thanks to Steve Barham for his contributions.
Migration Notes
β‘οΈ The change from
UnitMultipler/multiplier
->UnitConverter/conversionFactor
will only affect user code where newQuantity
orUnitOfMeasure
types have been created. That code should only need to be updated to reflect the new names. Code that only uses built-in quantities and units should not be affected.Modifications to the
TimeIntegral
andTimeDerivative
hide the previously visiblechange
andtime
fields, which are generally not useful in user code, but may affect Quantity implementations. In addition the TimeIntegral./() implementations have been replaced by a standard implementation within the trait.π¦ The
ElementaryConstant
value has been moved to theelectro
package.β‘οΈ The renaming of Dimension, MassFlow, VolumeFlow, and CubicUsMiles may require user code to be updated.
β‘οΈ The update to the Quantity model - to preserve the unit used when creating, and rename valueUnit->unit - may affect some users that were accessing the valueUnit directly. Which should generally not be used directly access by user code. This will affect user code used to create new Dimensions, Quantities and Units.
-
v0.4.2 Changes
July 06, 2014π Improvements to Market
- β Add
Price.in
method for directly converting a price to a different currency - β Add
Price.toString(unit)
method to support formatting in a specific unit - β Add
Money.toString
overload to support formatting in a different currency - π¨ Refactor Currencies to be objects rather than vals (no change in usage)
- β Add
Currency./
method for creating exchange rates - β Add MoneyNumeric
- β Add Comparisons for cross-currency Money values (
==#
,!=#
,<#
,<=#
,>#
,>=#
)
Other General Improvements
- β Add
Quantity.toString
overload that supports standard number formatting (ie, "%3.2f") - β Add
β
as another approx operator - β Add SquantifiedBigDecimal, remove SquantifiedNumeric
- Factor out common data and behavior to new
QuantityCompanion
trait - implemented for all data types exceptMoney
which currently requires special handling - π Implement
String => Quantity
parsing conversions returningTry[Quantity]
for all existing types (see Migration Notes below) - β Additional Units:
- ElectricCharge:
MilliampereHours
,MilliampereSeconds
- ElectricCharge:
- β Add
unapply
toUnitOfMeasure
trait and deprecate existing extractors in its favor - β Json Serialization - experimental, test code only
- β Generic Quantity Value - experimental, test code only
- β Add support for Scala cross-version builds (2.10 and 2.11) with 2.11.1 as the default
π Bug fixes
- π Fixed
SquareInches.symbol
Migration Note
π Quantity String Parsing
π String parsers no longer return
Either[String, Q]
but will return aTry[Q]
instead (whereQ
is the specific quantity type). For example,Mass("10 kg")
will return aTry[Mass]
.π On failure the
Try.failed
will contain aQuantityStringParseException
which includes the original string to be parsed. This could be used to recover using an alternative parser.Quantity Value Model Unification
π¨ Quantity types implemented as case classes which stored the ratio components of their value (i.e.
Velocity(length, time)
) have been refactored to have a single underlying value.β This reduction of all types to a single underlying value has resulted in some loss of precision - reflected in the use of more "approximately equal to" tests. However, this change is a precursor to future work that will support far better precision.
Temperature
andMoney
remain as exceptions to the prevailing model. - β Add