biocore/empress

Save extra work of cos/sin calls

オープン

#225 opened on 2020/06/29

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (32 件のフォーク)auto 404
good first issueperformancerefactoring

Repository metrics

Stars
 (56 個のスター)
PR merge metrics
 (PR metrics pending)

説明

@wasade pointed this out about this JS code -- there are 8 calls to cos or sin within this block, but we could cut this down to just 4 calls by saving the value of each call for later in the block.

From some more digging, this also impacts this JS code for drawing thick lines, as well as this python code.

コントリビューターガイド