mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 15:18:12 +08:00
Fix polygon overflow (#644)
* changed polygon side to u32 + set max polygon side to 1000 * revert unnecessary change * Include unwrap for vertices input
This commit is contained in:
committed by
Keavon Chambers
parent
29e00e488b
commit
4c3c925c2c
@@ -105,7 +105,7 @@ impl ShapeLayer {
|
||||
///
|
||||
/// # Panics
|
||||
/// This function panics if `sides` is zero.
|
||||
pub fn ngon(sides: u8, style: PathStyle) -> Self {
|
||||
pub fn ngon(sides: u32, style: PathStyle) -> Self {
|
||||
use std::f64::consts::{FRAC_PI_2, TAU};
|
||||
|
||||
fn unit_rotation(theta: f64) -> DVec2 {
|
||||
|
||||
Reference in New Issue
Block a user