accessor_core

Accessors for Core types, for use with the Accessor library
IN THIS PACKAGE
val mult : ( _, float, Core.Percent.t, [< Accessor_core__Import.isomorphism ] ) Accessor_base.t

Access a percent as a float.

val percentage : ( _, float, Core.Percent.t, [< Accessor_core__Import.isomorphism ] ) Accessor_base.t

Access a percent as a float multiplied by 100. This is not quite well-behaved, due to potential rounding error.

val bp : ( _, float, Core.Percent.t, [< Accessor_core__Import.isomorphism ] ) Accessor_base.t

Access a percent as a float multiplied by 10_000. This is not quite well-behaved, due to potential rounding error.

val scaled : float -> ( _, Core.Percent.t, Core.Percent.t, [< Accessor_core__Import.isomorphism ] ) Accessor_base.t

scaled is not a well-behaved accessor, because it does not necessarily round trip.