heightPercentToPxUnitDoubleGetter function

PxUnitValueGetter<PxUnitDouble> heightPercentToPxUnitDoubleGetter(
  1. double hpcValue, [
  2. PxUnit toPu = PxUnit.hpc
])

高度百分比 的 值转换((Y,hpc)->(M,?)), 默认 1:1转换为 hpc

Implementation

PxUnitValueGetter<PxUnitDouble> heightPercentToPxUnitDoubleGetter(double hpcValue, [PxUnit toPu = PxUnit.hpc]){
  return (Size viewport)=> (hpcValue * heightPercentToPxUnitGetter(toPu)(viewport), toPu);
}