Sha256: cdfee3a4d445bde91dfd1a3c8a0f3f5c8db4eeb8f1c1081552f07ffecc32964a
Contents?: true
Size: 843 Bytes
Versions: 396
Compression:
Stored size: 843 Bytes
Contents
#import <Foundation/Foundation.h> #import "SpaceAgeExample.h" @implementation SpaceAge { long _seconds; double _earthYears; } - (instancetype) initWithSeconds:(long)seconds { if (self = [super init]) { _seconds = seconds; _earthYears = seconds / 31557600.0; } return self; } - (long) seconds { return _seconds; } - (double) onEarth { return _earthYears; } - (double) onMercury { return _earthYears / 0.2408467; } - (double) onVenus { return _earthYears / 0.61519726; } - (double) onMars { return _earthYears / 1.8808158; } - (double) onJupiter { return _earthYears / 11.862615; } - (double) onSaturn { return _earthYears / 29.447498; } - (double) onUranus { return _earthYears / 84.016846; } - (double) onNeptune { return _earthYears / 164.79132; } @end
Version data entries
396 entries across 396 versions & 1 rubygems