/
concept-collection
/
jupyterlite-numbl-kernel
Jump to
/
Appearance
Match my system
Paper
GitHub
Slate
Midnight
Terminal
Sign in
concept-collection
/
jupyterlite-numbl-kernel
Code
Commits
Issues
0
Pull requests
0
Actions
Branches
1
Tags
0
Site
main
Branches
main
jupyterlite-numbl-kernel
/
demo
/
content
/
+geom
/
Point.m
15 lines · 342 B
Copy
Copied
Blame
History
Raw
1
classdef Point
2
% A
class
that lives inside the +geom package: geom.Point(...).
3
properties
4
x =
0
5
y =
0
6
end
7
methods
8
function obj = Point(x, y)
9
if
nargin >
0
, obj.x = x; obj.y = y; end
10
end
11
function d = dist(obj)
12
d = sqrt(obj.x^
2
+ obj.y^
2
);
13
end
14
end
15
end
↑
↓
move
↵
open
esc
close