diff --git a/subjects/lalgebra_scalar/README.md b/subjects/lalgebra_scalar/README.md index 96594b21..be061e97 100644 --- a/subjects/lalgebra_scalar/README.md +++ b/subjects/lalgebra_scalar/README.md @@ -2,19 +2,15 @@ ### Instructions -Define a `Scalar` trait which must implement the operations Addition, Subtraction, Multiplication and Division (you might also have to use more restrictions). For this use a trait inheritance (supertraits) +Define a `Scalar` trait which implements the operations `Add`, `Sub`, `Mul`, `Div` and any other restrictions you may need. Use a trait inheritance (supertraits) -Another condition for a number to be a scalar is to have a zero (neutral element in the addition) and a one (neutral element in the multiplication). Therefore the `Scalar` trait will require 2 functions zero() and one() (as shown) +Another condition for a number to be a scalar is to have a `zero` (as the neutral element in the addition), and a `one` (as the neutral element in the multiplication). Therefore the `Scalar` trait will require these two functions (described below). -After finishing completing the declaration of the trait, implement the `Scalar` trait for u32, u64, i32, i64, f32 and f64. - -### Notions - -- [Module std::ops](https://doc.rust-lang.org/std/ops/index.html) +After finishing completing the declaration of the trait, implement the `Scalar` trait for `u32`, `u64`, `i32`, `i64`, `f32` and `f64`. ### Expected Function (The signature must be completed) -#### You need add the impl for each cases asked in the subject +> You need add the impl for each cases asked in the subject ```rust pub trait Scalar: _ { @@ -49,3 +45,7 @@ $ cargo run 1 $ ``` + +### Notions + +- [Module std::ops](https://doc.rust-lang.org/std/ops/index.html)