└── square mars /square mars: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // Generated with Spectral Syntax 3 | 4 | pragma solidity ^0.8.0; 5 | 6 | contract MarsOrbit { 7 | struct OrbitalElements { 8 | uint256 a; // Semi-major axis 9 | uint256 e; // Eccentricity 10 | uint256 T; // Time at perihelion 11 | uint256 i; // Inclination 12 | uint256 N; // Longitude of Ascending Node 13 | uint256 w; // Argument of periapsis 14 | } 15 | 16 | OrbitalElements public marsOrbit; 17 | 18 | function setMarsOrbit(OrbitalElements memory _marsOrbit) public { 19 | marsOrbit = _marsOrbit; 20 | } 21 | 22 | function calculateSquareOfMarsOrbit() public view returns (uint256) { 23 | return marsOrbit.a * marsOrbit.a; 24 | } 25 | } 26 | --------------------------------------------------------------------------------