|
|
|
|
|
by Misdicorl
1090 days ago
|
|
The solution to your quandary is to realize the division operator is massively overloaded in your expression. What you actually want is to specify s and r as true line segments and define a new operator which takes two segments and outputs the angle between them. This operator happens to reduce to division of magnitudes in certain circumstances. Edit: in other words, you've encoded tons of information in the problem statement about the relationship between r and s and you aren't properly encoding that in your type system allowing s/r to output an angle |
|