14 lines
323 B
Mojo
Generated
14 lines
323 B
Mojo
Generated
struct LidarScan(Copyable):
|
|
var near_points: Int
|
|
|
|
def __init__(out self, near_points: Int, far_points: Int):
|
|
self.near_points = near_points
|
|
|
|
def total(self) -> Int:
|
|
return self.near_points + self.far_points
|
|
|
|
|
|
def main():
|
|
var scan = LidarScan(8, 256)
|
|
print("Total points:", scan.total())
|