QCaml/common/charge.org

2.0 KiB

Charge

Type

<<<~Charge.t~>>>

type t

This type should be used for all charges in the program (electrons, nuclei,…).

Conversions

val of_float : float -> t
val to_float : t -> float

val of_int   : int -> t
val to_int   : t -> int

val of_string: string -> t
val to_string: t -> string

Simple operations

val ( + ) : t -> t -> t
val ( - ) : t -> t -> t
val ( * ) : t -> float -> t
val ( / ) : t -> float -> t 
val is_null : t -> bool

Printers

val pp : Format.formatter -> t -> unit