You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In latest version of microdown we have support to know if a method is in sync with its counter part in a pharo system.
For example
degrees
"Answer the angle the receiver makes with origin in degrees. right is 0; down is 90."
| tan theta |
^ x = 0
ifTrue:
[ y >= 0
ifTrue: [ 90.0 ]
ifFalse: [ 270.0 ] ]
ifFalse:
[ tan := y asFloat / x asFloat.
theta := tan arcTan.
x >= 0
ifTrue:
[ y >= 0
ifTrue: [ theta radiansToDegrees ]
ifFalse: [ 360.0 + theta radiansToDegrees ] ]
ifFalse: [ 180.0 + theta radiansToDegrees ] ]
will tell the author if the method Point>>#degrees is changed.
Now it is based on string equality so this is not really good.
First because we can format it a bit differently on the book second because in books we often prefix with the class name e.g.
Point >> #degrees
"Answer the angle the receiver makes with origin in degrees. right is 0; down is 90."
| tan theta |
^ x = 0
ifTrue:
[ y >= 0
ifTrue: [ 90.0 ]
ifFalse: [ 270.0 ] ]
ifFalse:
[ tan := y asFloat / x asFloat.
theta := tan arcTan.
x >= 0
ifTrue:
[ y >= 0
ifTrue: [ theta radiansToDegrees ]
ifFalse: [ 360.0 + theta radiansToDegrees ] ]
ifFalse: [ 180.0 + theta radiansToDegrees ] ]
And Point >> is not part of the definition of the method.
A solution is
to check and identify the method starts by ignoring the Point >> or Point class >>. Note that this part is also optional since the author may just put the method body.
to use ast comparison instead of string.
The text was updated successfully, but these errors were encountered:
In latest version of microdown we have support to know if a method is in sync with its counter part in a pharo system.
For example
will tell the author if the method Point>>#degrees is changed.
Now it is based on string equality so this is not really good.
First because we can format it a bit differently on the book second because in books we often prefix with the class name e.g.
And Point >> is not part of the definition of the method.
A solution is
The text was updated successfully, but these errors were encountered: