Module Percent_u

type t
include Ppx_quickcheck_runtime.Quickcheckable.S with type t := t
val quickcheck_generator : t Base_quickcheck.Generator.t
val quickcheck_observer : t Base_quickcheck.Observer.t
val quickcheck_shrinker : t Base_quickcheck.Shrinker.t
val globalize : t @ local -> t @@ portable

Serializers

val sexp_of_t : t -> Core.Sexp.t @@ portable
val t_of_sexp : Core.Sexp.t -> t @@ portable
val to_string : t -> string @@ portable
val of_string : string -> t @@ portable
include Core.Bin_prot.Binable.S__local with type t := t
include Bin_prot.Binable.S_only_functions__local with type t := t
include sig ... end
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : t Bin_prot.Read.vtag_reader

This function only needs implementation if t exposed to be a polymorphic variant. Despite what the type reads, this does *not* produce a function after reading; instead it takes the constructor tag (int) before reading and reads the rest of the variant t afterwards.

val bin_shape_t : Bin_prot.Shape.t
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
include Ppx_hash_lib.Hashable.S_any with type t := t
val hash_fold_t : t Ppx_hash_lib.hash_fold
val typerep_of_t : t Core.Typerep.t @@ portable
val box : t -> Core.Percent.t @@ portable
val unbox : Core.Percent.t @ local -> t @@ portable
module O : sig ... end

Infix

include module type of O
val (*) : t -> t -> t
val (+) : t -> t -> t
val (-) : t -> t -> t
val (/) : t -> t -> t
val (//) : t -> t -> Float_u.t

Comparison Infix

val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool

Comparison

val equal : t -> t -> bool @@ portable
val compare : t -> t -> int @@ portable
val min : t -> t -> t @@ portable
val max : t -> t -> t @@ portable
val ascending : t -> t -> int @@ portable
val descending : t -> t -> int @@ portable
val between : t -> low:t -> high:t -> bool @@ portable
val clamp_exn : t -> min:t -> max:t -> t @@ portable
val is_nan : t -> bool @@ portable

Conversion

The _approx functions below avoid float division.

val of_mult : Float_u.t -> t @@ portable
val to_mult : t -> Float_u.t @@ portable
val of_percentage : Float_u.t -> t @@ portable
val of_percentage_approx : t -> Float_u.t @@ portable
val to_percentage : t -> Float_u.t @@ portable
val of_bp : Float_u.t -> t @@ portable
val of_bp_approx : Float_u.t -> t @@ portable
val to_bp : t -> Float_u.t @@ portable
val of_bp_int : int -> t @@ portable
val of_bp_int_approx : int -> t @@ portable
val to_bp_int : t -> int @@ portable

Misc

val zero : unit -> t @@ portable
val one_hundred_percent : unit -> t @@ portable
val apply : t -> Float_u.t -> Float_u.t @@ portable
val scale : t -> Float_u.t -> t @@ portable
val select : bool -> t -> t -> t @@ portable
module Option : sig ... end
module Stable : sig ... end