This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Alexandre B A Villares - https://abav.lugaralgum.com/sketch-a-day | |
# More explorations of lines in grids | |
from pytop5js import * | |
W = None | |
H = None | |
num = None | |
line_combos = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
class Posicao(): | |
def __init__(self, lat, lng): | |
self.lat, self.lng = lat, lng | |
@property | |
def lat(self): | |
return math.degree(self.phi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Wallet: | |
def __init__(self, money): | |
self.money = money | |
def subtract(self, amount): | |
self.money -= amount | |
def add(self, amount): | |
self.money += amount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Wallet: | |
def __init__(self, money): | |
self.money = money | |
def subtract(self, amount): | |
self.money -= amount | |
def add(self, amount): | |
self.money += amount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Wallet: | |
def __init__(self, money): | |
self.money = money | |
def subtract(self, amount): | |
self.money -= amount | |
def add(self, amount): | |
self.money += amount |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
class Posicao(): | |
def __init__(self, lat, lng): | |
self.lat, self.lng = lat, lng | |
self.geometria = GeometriaPlana() | |
self.unidade = UnidadeQuilometro() | |
@property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
class Posicao(): | |
PLANA, ESFERICA, ELIPTICA = 'plana', 'esferica', 'eliptica' | |
KM, M, MILHAS = 'kms', 'm', 'miles' | |
def __init__(self, lat, lng): | |
self.lat, self.lng = lat, lng | |
self.geometria = self.PLANA | |
self.unidade = self.KM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Posicao(): | |
def __init__(self, lat, lng): | |
self.lat, self.lng = lat, lng | |
@property | |
def lat(self): | |
return self._lat | |
@lat.setter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Posicao(): | |
def __init__(self, lat, lng): | |
self.lat, self.lng = lat, lng | |
def distancia(pos_1, pos_2): | |
#### implementação do cálculo de distância | |
def direcao(pos_1, pos_2): | |
#### implementação do cálculo de direção |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Posicao(): | |
def __init__(self, lat, lng): | |
self.set_lat(lat) | |
self.set_lng(lng) | |
def get_lat(self): | |
return self.__lat | |
def set_lat(self, value): |