Function copyInt [src]

Set a Rational directly from an Int.

Prototype

pub fn copyInt(self: *Rational, a: Int) !void

Parameters

self: *Rationala: Int

Source

pub fn copyInt(self: *Rational, a: Int) !void { try self.p.copy(a.toConst()); try self.q.set(1); }