Giter VIP home page Giter VIP logo

Comments (3)

nical avatar nical commented on August 17, 2024

Hi, sounds good to me! Euclid has a no-std feature so if you would like to submit a PR, please use core::iter::Sum instead of the std one so things keep working in that configuration.
You would add a Sum implementation to all types that implement AddAssign where the parameter is the same type (for example no Sum for point types since point + point is disallowed.

from euclid.

mikepurvis avatar mikepurvis commented on August 17, 2024

Okay! I got started by implementing it for Angle, and that was fairly trivial, but in order for it to work with iter().sum() as well as iter().copied().sum(), it needed to have a second Sum<&Angle> impl, and this necessitated also adding an Add<&Angle> impl. All this works fine, but before I proceed with the rest of the types, I wanted to check:

  • Is there a reason the other &Angle trait impls don't exist? Should that part be excluded?
  • Is it okay to add them piecemeal as part of this and other changes, or would you like them added as a complete set all at once, either in this change or as a separate one ahead of it?

My work so far is here: master...mikepurvis:sum-traits

from euclid.

mikepurvis avatar mikepurvis commented on August 17, 2024

Closing in favour of #470.

from euclid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.