blob: 1a50c4edf24af0ddd2b2531dff4cd05c304082d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "othertypesystypedef.h"
OtherValueWithUnitUser::OtherValueWithUnitUser() = default;
ValueWithUnit<double, LengthUnit::Inch>
OtherValueWithUnitUser::doubleMillimeterToInch(ValueWithUnit<double, LengthUnit::Millimeter> v)
{
return ValueWithUnit<double, LengthUnit::Inch>(v.value() / 254);
}
ValueWithUnit<int, LengthUnit::Inch>
OtherValueWithUnitUser::intMillimeterToInch(ValueWithUnit<int, LengthUnit::Millimeter> v)
{
return ValueWithUnit<int, LengthUnit::Inch>(v.value() / 254);
}
|