This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
import { roundHalfUp } from "@/lib/math";
const KG_TO_LB = 2.20462;
const CM_TO_IN = 2.54;
/** kg → lb,ROUND_HALF_UP 保留 2 位(GD-13) */
export function kgToLb(kg: number): number {
return roundHalfUp(kg * KG_TO_LB, 2);
}
/** cm → in,ROUND_HALF_UP 保留 2 位(GD-13) */
export function cmToIn(cm: number): number {
return roundHalfUp(cm / CM_TO_IN, 2);