Function setInt [src]

Set a Rational from a primitive integer type.

Prototype

pub fn setInt(self: *Rational, a: anytype) !void

Parameters

self: *Rational

Source

pub fn setInt(self: *Rational, a: anytype) !void { try self.p.set(a); try self.q.set(1); }