Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.
pNre edited this page Jul 15, 2014 · 1 revision

Contents

#Instance methods

abs

  • abs () -> Double

Equivalent to fabs(self).


sqrt

  • sqrt () -> Double

Equivalent to sqrt(self).


floor

  • floor () -> Double

Equivalent to floor(self).


ceil

  • ceil () -> Double

Equivalent to ceil(self).


round

  • round () -> Double

Equivalent to round(self).

#Class methods

random

  • random(min: Double = 0, max: Double) -> Double

Returns a random Double between min and max (inclusive).

Example

Double.random(min: 5, max: 10)
// → 5.302852
Clone this wiki locally