Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-rosetta/blob/main/exercises/triangle/.meta/example.om # omega-rosetta aien-dev/omega-rosetta Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-rosetta / exercises / triangle / .meta / example.om` 22 lines ยท 889 bytes Raw Blame History 1 note Exercism-style exercise "triangle": https://exercism.org/tracks/python/exercises/triangle 2 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 note The sides a b c form a triangle when each is greater than 0 and the sum of any two is at least 4 note the third. equilateral: a triangle with all three sides equal; isosceles: a triangle with at 5 note least two sides equal; scalene: a triangle with all sides different. 6 note Check it with: sh exercise.sh exercises/triangle 7 om2 8 fn istri a f64 b f64 c f64 to bool 9 if or or le a 0.0 le b 0.0 le c 0.0 10 ret false 11 end 12 ret and and ge add a b c ge add b c a ge add a c b 13 end 14 fn equilateral a f64 b f64 c f64 to bool 15 ret and istri a b c and eq a b eq b c 16 end 17 fn isosceles a f64 b f64 c f64 to bool 18 ret and istri a b c or or eq a b eq b c eq a c 19 end 20 fn scalene a f64 b f64 c f64 to bool 21 ret and istri a b c and and ne a b ne b c ne a c 22 end