JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

Untitled Page | JustPaste.app
about 2 months ago1 views
👨‍💻Programming
Angles = {}
Angles.__index = Angles

function Angles.new(x, z)
    return setmetatable({
        x = x or 0,
        z = z or 0
    }, Angles)
end

Angles.__add = function(a, b)
    return Angles.new(
        a.x + b.x,
        a.z + b.z
    )
end

Angles.__sub = function(a, b)
    return Angles.new(
        a.x - b.x,
        a.z - b.z
    )
end
gimbal = peripheral.wrap("left")
navigation = peripheral.wrap("right")

print(gimbal.getAngles())
print(navigation.getHeading())
← Back to timeline