Jump to content

Category talk:Wren-long: Difference between revisions

m
→‎Source code: Minor bug fix.
(→‎Source code: Removed the previous limitation on the ULong.isPrime method.)
m (→‎Source code: Minor bug fix.)
Line 458:
// Returns the next prime number greater than the current instance.
nextPrime {
var n = isEven ?if (this +< ULong.One : thistwo) +return ULong.two
var n = isEven ? this + ULong.one : this + ULong.two
while (true) {
if (n.isPrime) return n
9,485

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.