MinMaxLocResult.mm 579 B

123456789101112131415161718192021222324252627
  1. //
  2. // MinMaxLocResult.m
  3. //
  4. // Created by Giles Payne on 2019/12/28.
  5. //
  6. #import "MinMaxLocResult.h"
  7. #import "Point2i.h"
  8. @implementation MinMaxLocResult
  9. - (instancetype)init {
  10. return [self initWithMinval:0 maxVal:0 minLoc:[Point2i new] maxLoc:[Point2i new]];
  11. }
  12. - (instancetype)initWithMinval:(double)minVal maxVal:(double)maxVal minLoc:(Point2i*)minLoc maxLoc:(Point2i*)maxLoc {
  13. self = [super init];
  14. if (self) {
  15. self.minVal = minVal;
  16. self.maxVal = maxVal;
  17. self.minLoc = minLoc;
  18. self.maxLoc = maxLoc;
  19. }
  20. return self;
  21. }
  22. @end